public class EncodingReadableByteChannel extends Object implements ReadableByteChannel
| Constructor and Description |
|---|
EncodingReadableByteChannel(Charset charset)
Creates a new EncodingReadableByteChannel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(CharSequence text)
Appends to the text stream to be encoded.
|
void |
close() |
boolean |
isOpen() |
int |
read(ByteBuffer dst) |
public EncodingReadableByteChannel(Charset charset)
charset - the character set used to encode the textpublic void append(CharSequence text)
text - the text to be encoded, null to terminate the streamNullPointerException - if text is nullIllegalStateException - if the input stream is terminatedpublic int read(ByteBuffer dst) throws IOException
read in interface ReadableByteChannelIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ChannelIOExceptionCopyright © 2011. All Rights Reserved.