public class StreamFilter extends StreamImpl
| Modifier and Type | Field and Description |
|---|---|
protected StreamImpl |
next |
_nullPath, _path| Constructor and Description |
|---|
StreamFilter() |
| 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.
|
int |
getAvailable()
Returns the number of bytes available without blocking.
|
void |
init(StreamImpl next) |
int |
read(byte[] buffer,
int offset,
int length)
Reads the next chunk from the stream.
|
void |
write(byte[] buffer,
int offset,
int length,
boolean atEnd)
Writes a buffer to the underlying stream.
|
clearWrite, closeWrite, flushBuffer, flushToDisk, getAttribute, getAttributeNames, getFlushOnNewline, getNewline, getPath, getReadBuffer, getReadPosition, hasSkip, isClosed, isEof, isMmapEnabled, isSendfileEnabled, readNonBlock, readTimeout, removeAttribute, seekEnd, seekStart, setAttribute, setPath, setWriteEncoding, skip, write, writeMmap, writeSendfileprotected StreamImpl next
public void init(StreamImpl next)
public boolean canRead()
StreamImplcanRead in class StreamImplpublic int read(byte[] buffer,
int offset,
int length)
throws java.io.IOException
StreamImplread in class StreamImplbuffer - byte array receiving the data.offset - starting offset into the array.length - number of bytes to read.java.io.IOExceptionpublic int getAvailable()
throws java.io.IOException
StreamImplgetAvailable in class StreamImpljava.io.IOExceptionpublic boolean canWrite()
StreamImplcanWrite in class StreamImplpublic void write(byte[] buffer,
int offset,
int length,
boolean atEnd)
throws java.io.IOException
StreamImplwrite in class StreamImplbuffer - the byte array to write.offset - the offset into the byte array.length - the number of bytes to write.atEnd - true when the write is flushing a close.java.io.IOExceptionpublic void flush()
throws java.io.IOException
StreamImplflush in class StreamImpljava.io.IOExceptionpublic void close()
throws java.io.IOException
StreamImplclose in class StreamImpljava.io.IOException