public class StringReader extends StreamImpl
_nullPath, _path
Modifier and Type | Method and Description |
---|---|
boolean |
canRead()
The string reader can always read.
|
int |
getAvailable()
Returns the number of characters available as an approximation to
the number of bytes ready.
|
static ReadStream |
open(java.lang.String string)
Creates a new ReadStream reading bytes from the given string.
|
int |
read(byte[] buf,
int offset,
int length)
Reads the next chunk from the stream.
|
canWrite, clearWrite, close, closeWrite, flush, flushBuffer, flushToDisk, getAttribute, getAttributeNames, getFlushOnNewline, getNewline, getPath, getReadBuffer, getReadPosition, hasSkip, isClosed, isEof, isMmapEnabled, isSendfileEnabled, readNonBlock, readTimeout, removeAttribute, seekEnd, seekStart, setAttribute, setPath, setWriteEncoding, skip, write, write, writeMmap, writeSendfile
public static ReadStream open(java.lang.String string)
string
- the source string.public boolean canRead()
canRead
in class StreamImpl
public int read(byte[] buf, int offset, int length) throws java.io.IOException
StreamImpl
read
in class StreamImpl
buf
- byte array receiving the data.offset
- starting offset into the array.length
- number of bytes to read.java.io.IOException
public int getAvailable() throws java.io.IOException
getAvailable
in class StreamImpl
java.io.IOException