Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.io: Javadoc index of package java.io.


Package Samples:

java.io

Classes:

ObjectOutputStream: An ObjectOutputStream can be used to write objects as well as primitive data in a platform-independent manner to an OutputStream . The data produced by an ObjectOutputStream can be read and reconstituted by an ObjectInputStream . writeObject (Object) is used to write Objects, the write<type> methods are used to write primitive data (as in DataOutputStream ). Strings can be written as objects or as primitive data. Not all objects can be written out using an ObjectOutputStream . Only those objects that are an instance of java.io.Serializable can be written. Using default serialization, information ...
InputStreamReader: This class reads characters from a byte input stream. The characters read are converted from bytes in the underlying stream by a decoding layer. The decoding layer transforms bytes to chars according to an encoding standard. There are many available encodings to choose from. The desired encoding can either be specified by name, or if no encoding is selected, the system default encoding will be used. The system default encoding name is determined from the system property file.encoding . The only encodings that are guaranteed to be availalbe are "8859_1" (the Latin-1 character set) and "UTF8". Unforunately, ...
OutputStreamWriter: This class writes characters to an output stream that is byte oriented It converts the chars that are written to bytes using an encoding layer, which is specific to a particular encoding standard. The desired encoding can either be specified by name, or if no encoding is specified, the system default encoding will be used. The system default encoding name is determined from the system property file.encoding . The only encodings that are guaranteed to be available are "8859_1" (the Latin-1 character set) and "UTF8". Unfortunately, Java does not provide a mechanism for listing the encodings that ...
LineNumberInputStream: This class functions like a standard InputStream except that it counts line numbers, and canonicalizes newline characters. As data is read, whenever the byte sequences "\r", "\n", or "\r\n" are encountered, the running line count is incremeted by one. Additionally, the whatever line termination sequence was encountered will be converted to a "\n" byte. Note that this class numbers lines from 0. When the first line terminator is encountered, the line number is incremented to 1, and so on. This class counts only line termination characters. If the last line read from the stream does not end in a ...
FilterInputStream: This is the common superclass of all standard classes that filter input. It acts as a layer on top of an underlying InputStream and simply redirects calls made to it to the subordinate InputStream instead. Subclasses of this class perform additional filtering functions in addition to simply redirecting the call. This class is not abstract. However, since it only redirects calls to a subordinate InputStream without adding any functionality on top of it, this class should not be used directly. Instead, various subclasses of this class should be used. This is enforced with a protected constructor. ...
ByteArrayOutputStream: This class allows data to be written to a byte array buffer and and then retrieved by an application. The internal byte array buffer is dynamically resized to hold all the data written. Please be aware that writing large amounts to data to this stream will cause large amounts of memory to be allocated. The size of the internal buffer defaults to 32 and it is resized by doubling the size of the buffer. This default size can be overridden by using the gnu.java.io.ByteArrayOutputStream.initialBufferSize property. There is a constructor that specified the initial buffer size and that is the preferred ...
Externalizable: This interface provides a way that classes can completely control how the data of their object instances are written and read to and from streams. It has two methods which are used to write the data to a stream and to read the data from a stream. The read method must read the data in exactly the way it was written by the write method. Note that classes which implement this interface must take into account that all superclass data must also be written to the stream as well. The class implementing this interface must figure out how to make that happen. This interface can be used to provide object ...
StringBufferInputStream: This class permits a String to be read as an input stream. The low eight bits of each character in the String are the bytes that are returned. The high eight bits of each character are discarded. The mark/reset functionality in this class behaves differently than normal. The mark() method is always ignored and the reset() method always resets in stream to start reading from position 0 in the String. Note that since this method does not override markSupported() in InputStream , calling that method will return false . Note that this class is deprecated because it does not properly handle 16-bit Java ...
CharArrayWriter: This class allows data to be written to a char array buffer and and then retrieved by an application. The internal char array buffer is dynamically resized to hold all the data written. Please be aware that writing large amounts to data to this stream will cause large amounts of memory to be allocated. The size of the internal buffer defaults to 32 and it is resized in increments of 1024 chars. This behavior can be over-ridden by using the following two properties: gnu.java.io.CharArrayWriter.initialBufferSize gnu.java.io.CharArrayWriter.bufferIncrementSize There is a constructor that specified ...
LineNumberReader: This class functions like a standard Reader except that it counts line numbers, and canonicalizes newline characters. As data is read, whenever the char sequences "\r", "\n", or "\r\n" are encountered, the running line count is incremeted by one. Additionally, the whatever line termination sequence was encountered will be converted to a "\n" char. Note that this class numbers lines from 0. When the first line terminator is encountered, the line number is incremented to 1, and so on. Also note that actual "\r" and "\n" characters are looked for. The system dependent line separator sequence is ignored. ...
FilterReader: This is the common superclass of all standard classes that filter input. It acts as a layer on top of an underlying Reader and simply redirects calls made to it to the subordinate Reader instead. Subclasses of this class perform additional filtering functions in addition to simply redirecting the call. When creating a subclass of FilterReader , override the appropriate methods to implement the desired filtering. However, note that the read(char[]) method does not need to be overridden as this class redirects calls to that method to read(yte[], int, int) instead of to the subordinate Reader} read(yte[]) ...
BufferedInputStream: This subclass of FilterInputStream buffers input from an underlying implementation to provide a possibly more efficient read mechanism. It maintains the buffer and buffer state in instance variables that are available to subclasses. The default buffer size of 2048 bytes can be overridden by the creator of the stream. This class also implements mark/reset functionality. It is capable of remembering any number of input bytes, to the limits of system memory or the size of Integer.MAX_VALUE Please note that this class does not properly handle character encodings. Consider using the BufferedReader class ...
SequenceInputStream: This class merges a sequence of multiple InputStream 's in order to form a single logical stream that can be read by applications that expect only one stream. The streams passed to the constructor method are read in order until they return -1 to indicate they are at end of stream. When a stream reports end of stream, it is closed, then the next stream is read. When the last stream is closed, the next attempt to read from this stream will return a -1 to indicate it is at end of stream. If this stream is closed prior to all subordinate streams being read to completion, all subordinate streams are ...
ObjectInputValidation: This class allows an object to validate that it is valid after deserialization has run completely for it and all dependent objects. This allows an object to determine if it is invalid even if all state data was correctly deserialized from the stream. It can also be used to perform re-initialization type activities on an object after it has been completely deserialized. Since this method functions as a type of callback, it must be registered through ObjectInputStream.registerValidation in order to be invoked. This is typically done in the readObject method.
PrintWriter: This class prints Java primitive values and objects to a stream as text. None of the methods in this class throw an exception. However, errors can be detected by calling the checkError() method. Additionally, this stream can be designated as "autoflush" when created so that any writes are automatically flushed to the underlying output sink whenever one of the println methods is called. (Note that this differs from the PrintStream class which also auto-flushes when it encounters a newline character in the chars written).
SerializablePermission: This class models permissions related to serialization. As a subclass of BasicPermission , this class has permissions that have a name only. There is no associated action list. There are currently two allowable permission names for this class: enableSubclassImplementation - Allows a subclass to override the default serialization behavior of objects. enableSubstitution - Allows substitution of one object for another during serialization or deserialization.
BufferedReader: This subclass of FilterReader buffers input from an underlying implementation to provide a possibly more efficient read mechanism. It maintains the buffer and buffer state in instance variables that are available to subclasses. The default buffer size of 8192 chars can be overridden by the creator of the stream. This class also implements mark/reset functionality. It is capable of remembering any number of input chars, to the limits of system memory or the size of Integer.MAX_VALUE
InvalidClassException: This exception is thrown when there is some sort of problem with a class during a serialization operation. This could be: the serial version of the class doesn't match the class contains unknown datatypes the class does not have an accessible no-arg constructor . The field classname will contain the name of the class that caused the problem if known. The getMessage() method for this exception will always include the name of that class if known.
PrintStream: This class prints Java primitive values and object to a stream as text. None of the methods in this class throw an exception. However, errors can be detected by calling the checkError() method. Additionally, this stream can be designated as "autoflush" when created so that any writes are automatically flushed to the underlying output sink when the current line is terminated. This class converts char's into byte's using the system default encoding.
OptionalDataException: This exception is thrown when unexpected data appears in the input stream from which a serialized object is being read. There are two cases: The next stream element is primitive data. eof will be false, and count is the number of bytes of primitive data available. The data consumable by readObject or readExternal has been exhausted. eof is true, and count is 0.
PushbackInputStream: This subclass of FilterInputStream provides the ability to unread data from a stream. It maintains an internal buffer of unread data that is supplied to the next read operation. This is conceptually similar to mark/reset functionality, except that in this case the position to reset the stream to does not need to be known in advance. The default pushback buffer size one byte, but this can be overridden by the creator of the stream.
PushbackReader: This subclass of FilterReader provides the ability to unread data from a stream. It maintains an internal buffer of unread data that is supplied to the next read operation. This is conceptually similar to mark/reset functionality, except that in this case the position to reset the stream to does not need to be known in advance. The default pushback buffer size one char, but this can be overridden by the creator of the stream.
FileReader: This class provides a convenient way to set up a Reader to read from a file. It opens the specified file for reading and creates the InputStreamReader to read from the resulting FileInputStream . This class can only be used to read from files using the default character encoding. Use InputStreamReader directly to use a non-default encoding.
FilterOutputStream: This class is the common superclass of output stream classes that filter the output they write. These classes typically transform the data in some way prior to writing it out to another underlying OutputStream . This class simply overrides all the methods in OutputStream to redirect them to the underlying stream. Subclasses provide actual filtering.
RandomAccessFile: This class allows reading and writing of files at random locations. Most Java I/O classes are either pure sequential input or output. This class fulfills the need to be able to read the bytes of a file in an arbitrary order. In addition, this class implements the DataInput and DataOutput interfaces to allow the reading and writing of Java primitives.

Home | Contact Us | Privacy Policy | Terms of Service