Java Document에 있는 내용으로 알아서들 번역해서 보라
Reader
Abstract class for reading character streams. The only methods that a subclass must implement are read(char[], int, int) and close(). Most subclasses, however, will override some of the methods defined here in order to provide higher efficiency, additional functionality, or both.
BufferedReader
Reads text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.
The buffer size may be specified, or the default size may be used. The default is large enough for most purposes.
In general, each read request made of a Reader causes a corresponding read request to be made of the underlying character or byte stream. It is therefore advisable to wrap a BufferedReader around any Reader whose read() operations may be costly, such as FileReaders and InputStreamReaders. For example,
BufferedReader in = new BufferedReader(new FileReader("foo.in"));
will buffer the input from the specified file. Without buffering, each invocation of read() or readLine() could cause bytes to be read from the file, converted into characters, and then returned, which can be very inefficient.
Programs that use DataInputStreams for textual input can be localized by replacing each DataInputStream with an appropriate BufferedReader.
CharArrayReader
This class implements a character buffer that can be used as a character-input stream.
FilterReader
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.
InputStreamReader
An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified
. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted. charset
Each invocation of one of an InputStreamReader's read() methods may cause one or more bytes to be read from the underlying byte-input stream. To enable the efficient conversion of bytes to characters, more bytes may be read ahead from the underlying stream than are necessary to satisfy the current read operation.
For top efficiency, consider wrapping an InputStreamReader within a BufferedReader. For example:
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
PipedReader
Piped character-input streams.
StringReader
A character stream whose source is a string.
'소프트웨어 개발 > Java - Basic' 카테고리의 다른 글
쓰레드(Thread) 관련 메서드가 죄다 Deprecated 된이유. (0) | 2015.08.29 |
---|---|
Reader 등으로 글자 입력받기 (0) | 2015.08.24 |
자바 주요 패키지 한글 설명 - 1.6 기준 (0) | 2015.08.15 |
ExecutorService 를 이용한 병렬처리 프로그램 (0) | 2015.08.10 |
Annotation 을 이용한 메서드 골라내기 (0) | 2015.08.02 |