public class ReaderWriterStream extends StreamImpl
_nullPath, _path| Constructor and Description |
|---|
ReaderWriterStream(java.io.Reader is,
java.io.Writer os) |
ReaderWriterStream(java.io.Reader is,
java.io.Writer os,
Path path) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead()
Returns true if this is a read stream.
|
boolean |
canWrite()
Returns true if this is a writable stream.
|
void |
close()
Closes the stream.
|
void |
flush()
Flushes the write output.
|
java.lang.String |
getEncoding() |
boolean |
getFlushOnNewline()
Returns true if the buffer should be flushed on every newline.
|
void |
init(java.io.Reader is,
java.io.Writer os) |
int |
read(byte[] buf,
int offset,
int length)
Reads the next chunk from the stream.
|
void |
setCloseChildOnClose(boolean close) |
void |
setFlushOnNewline(boolean value) |
void |
write(byte[] buf,
int offset,
int length,
boolean isEnd)
Implementation of the writer write.
|
clearWrite, closeWrite, flushBuffer, flushToDisk, getAttribute, getAttributeNames, getAvailable, getNewline, getPath, getReadBuffer, getReadPosition, hasSkip, isClosed, isEof, isMmapEnabled, isSendfileEnabled, readNonBlock, readTimeout, removeAttribute, seekEnd, seekStart, setAttribute, setPath, setWriteEncoding, skip, write, writeMmap, writeSendfilepublic ReaderWriterStream(java.io.Reader is,
java.io.Writer os)
public ReaderWriterStream(java.io.Reader is,
java.io.Writer os,
Path path)
public void init(java.io.Reader is,
java.io.Writer os)
public java.lang.String getEncoding()
public boolean canRead()
StreamImplcanRead in class StreamImplpublic int read(byte[] buf,
int offset,
int length)
throws java.io.IOException
StreamImplread in class StreamImplbuf - byte array receiving the data.offset - starting offset into the array.length - number of bytes to read.java.io.IOExceptionpublic boolean canWrite()
StreamImplcanWrite in class StreamImplpublic boolean getFlushOnNewline()
StreamImplgetFlushOnNewline in class StreamImplpublic void setFlushOnNewline(boolean value)
public void write(byte[] buf,
int offset,
int length,
boolean isEnd)
throws java.io.IOException
write in class StreamImplbuf - byte buffer containing the bytesoffset - offset where to start writinglength - number of bytes to writeisEnd - true when the write is flushing a close.java.io.IOExceptionpublic void flush()
throws java.io.IOException
StreamImplflush in class StreamImpljava.io.IOExceptionpublic void setCloseChildOnClose(boolean close)
public void close()
throws java.io.IOException
StreamImplclose in class StreamImpljava.io.IOException