java.lang.Object
de.haumacher.msgbuf.server.io.ReaderAdapter
- All Implemented Interfaces:
Reader
- Author:
- Bernhard Haumacher
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ReaderAdapter
Creates aReaderAdapter.
-
-
Method Details
-
read
Description copied from interface:ReaderReads a single character.Subclasses that intend to support efficient single-character input should override this method.
- Specified by:
readin interfaceReader- Returns:
- The character read, as an integer in the range 0 to 65535 (0x00-0xffff), or -1 if the end of the stream has been reached
- Throws:
IOException- If an I/O error occurs
-
read
Description copied from interface:ReaderReads characters into a portion of an array.- Specified by:
readin interfaceReader- Parameters:
cbuf- Destination bufferoff- Offset at which to start storing characterslen- Maximum number of characters to read- Returns:
- The number of characters read, or -1 if the end of the stream has been reached
- Throws:
IOException- If an I/O error occurs
-
close
Description copied from interface:ReaderCloses the stream and releases any system resources associated with it. Once the stream has been closed, further read(), ready(), mark(), reset(), or skip() invocations will throw anIOException. Closing a previously closed stream has no effect.- Specified by:
closein interfaceReader- Throws:
IOException- If an I/O error occurs
-