Hierarchy Structure
Reader Hierarchy
Classes
Class | Description |
---|---|
Reader | Abstract class for reading character streams. |
BufferedReader | It extends Reader. Reads text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines. |
LineNumberReader | It extends BufferedReader. A buffered character-input stream that keeps track of line numbers. |
CharArrayReader | It extends Reader. This class implements a character buffer that can be used as a character-input stream. |
FilterReader | It extends Reader. Abstract class for reading filtered character streams. The abstract class FilterReader itself provides default methods that pass all requests to the contained stream. Subclasses of FilterReader should override some of these methods and may also provide additional methods and fields. |
PushbackReader | It extends FilterReader. A character-stream reader that allows characters to be pushed back into the stream. |
InputStreamReader | It extends Reader. An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform’s default charset may be accepted. |
FileReader | It extends InputStreamReader. Convenience class for reading character files. The constructors of this class assume that the default character encoding and the default byte-buffer size are appropriate. To specify these values yourself, construct an InputStreamReader on a FileInputStream. |
PipedReader | It extends Reader. Piped character-input streams. |
StringReader | It extends Reader. A character stream whose source is a string. |
Writer Hierarchy
Classes
Class | Description |
---|---|
Writer | Abstract class for writing to character streams. |
BufferedWriter | It extends Writer. Writes text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings. |
CharArrayWriter | It extends Writer. This class implements a character buffer that can be used as an Writer. The buffer automatically grows when data is written to the stream. The data can be retrieved using toCharArray() and toString(). |
FilterWriter | It extends Writer. Abstract class for writing filtered character streams.The abstract class FilterWriter itself provides default methods that pass all requests to the contained stream. Subclasses of FilterWriter should override some of these methods and may also provide additional methods and fields. |
OutputStreamWriter | It extends Writer. An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are encoded into bytes using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform’s default charset may be accepted. |
FileWriter | It extends OutputStreamWriter. Convenience class for writing character files. The constructors of this class assume that the default character encoding and the default byte-buffer size are acceptable. To specify these values yourself, construct an OutputStreamWriter on a FileOutputStream. |
PipedWriter | It extends Writer. Piped character-output streams. |
PrintWriter | It extends Writer. Prints formatted representations of objects to a text-output stream. |
StringWriter | It extends Writer. A character stream that collects its output in a string buffer, which can then be used to construct a string. |