public class MemoryStream extends StreamImpl
_nullPath, _path| Constructor and Description |
|---|
MemoryStream() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canWrite()
A memory stream is writable.
|
void |
destroy() |
int |
getLength() |
Path |
getPath()
Returns the Path associated with the stream.
|
ReadStream |
openReadAndSaveBuffer() |
void |
write(byte[] buf,
int offset,
int length,
boolean isEnd)
Writes a buffer to the underlying stream.
|
void |
writeToStream(java.io.OutputStream os) |
canRead, clearWrite, close, closeWrite, flush, flushBuffer, flushToDisk, getAttribute, getAttributeNames, getAvailable, getFlushOnNewline, getNewline, getReadBuffer, getReadPosition, hasSkip, isClosed, isEof, isMmapEnabled, isSendfileEnabled, read, readNonBlock, readTimeout, removeAttribute, seekEnd, seekStart, setAttribute, setPath, setWriteEncoding, skip, write, writeMmap, writeSendfilepublic Path getPath()
StreamImplgetPath in class StreamImplpublic boolean canWrite()
canWrite 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 writeToStream(java.io.OutputStream os)
throws java.io.IOException
java.io.IOExceptionpublic int getLength()
public ReadStream openReadAndSaveBuffer() throws java.io.IOException
java.io.IOExceptionpublic void destroy()