public class MemoryPath.MemoryStream extends StreamImpl
_nullPath, _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 |
flushToDisk()
Flushes the write output, forcing to disk.
|
int |
getAvailable()
Returns the number of bytes available without blocking.
|
int |
getPosition() |
int |
read(byte[] buf,
int bufOffset,
int length)
Reads the next chunk from the stream.
|
void |
seekStart(long pos)
Seeks based on the start.
|
java.lang.String |
toString() |
void |
write(byte[] buf,
int offset,
int length,
boolean isEnd)
Writes a buffer to the underlying stream.
|
clearWrite, close, closeWrite, flush, flushBuffer, getAttribute, getAttributeNames, getFlushOnNewline, getNewline, getPath, getReadBuffer, getReadPosition, hasSkip, isClosed, isEof, isMmapEnabled, isSendfileEnabled, readNonBlock, readTimeout, removeAttribute, seekEnd, setAttribute, setPath, setWriteEncoding, skip, write, writeMmap, writeSendfilepublic int getAvailable()
StreamImplgetAvailable in class StreamImplpublic boolean canRead()
StreamImplcanRead in class StreamImplpublic int read(byte[] buf,
int bufOffset,
int length)
throws java.io.IOException
StreamImplread in class StreamImplbuf - byte array receiving the data.bufOffset - starting offset into the array.length - number of bytes to read.java.io.IOExceptionpublic int getPosition()
public void seekStart(long pos)
StreamImplseekStart in class StreamImplpublic boolean canWrite()
StreamImplcanWrite in class StreamImplpublic void write(byte[] buf,
int offset,
int length,
boolean isEnd)
throws java.io.IOException
write in class StreamImplbuffer - the byte array to write.offset - the offset into the byte array.length - the number of bytes to write.isEnd - true when the write is flushing a close.java.io.IOExceptionpublic void flushToDisk()
StreamImplflushToDisk in class StreamImplpublic java.lang.String toString()
toString in class java.lang.Object