public class BufferedReadableByteChannel extends Object implements ReadableByteChannel
| Constructor and Description |
|---|
BufferedReadableByteChannel(ReadableByteChannel input)
This constructor creates a new instance of this class with an internal
buffer of 32k bytes.
|
BufferedReadableByteChannel(ReadableByteChannel input,
int bufSize)
This constructor creates a new instance of this class with an internal
buffer of the given buffer-size.
|
public BufferedReadableByteChannel(ReadableByteChannel input)
input - The byte-channel this instance reads from.public BufferedReadableByteChannel(ReadableByteChannel input, int bufSize)
input - bufSize - public String readLine() throws IOException
\n newline
character, from the currently available bytes. If there can no complete line
be read (i.e. no newline char in the buffer), then the method transfers the
currently available bytes into a "partial complete line" and immediately
returns null.null if no complete line can be read
from the currently available bytes.IOExecption - in caseIOExceptionpublic int read(ByteBuffer dst) throws IOException
read in interface ReadableByteChannelIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ChannelIOExceptionChannel.close()public boolean isOpen()
isOpen in interface ChannelChannel.isOpen()Copyright © 2014 jwall.org. All Rights Reserved.