|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.caucho.vfs.StreamImpl | +--com.caucho.vfs.TempStream
Fields inherited from class com.caucho.vfs.StreamImpl |
nullPath, path |
Constructor Summary | |
TempStream(Path backingDir)
|
Method Summary | |
boolean |
canWrite()
Returns true if this is a writable stream. |
void |
changeToBackingFile(int index)
|
void |
clearWrite()
Clears any buffered values in the write. |
void |
close()
Closes the stream. |
void |
destroy()
Clean up the temp stream. |
void |
discard()
|
void |
flush()
Flushes the write output. |
int |
getLength()
Returns the total length of the buffer's bytes |
ReadStream |
openRead()
Opens a read stream to the buffer. |
ReadStream |
openRead(boolean free)
Opens a read stream to the buffer. |
ReadStream |
openRead(ReadStream s)
|
void |
openRead(ReadStream rs,
boolean free)
Opens a read stream to the buffer. |
void |
openWrite()
|
void |
write(byte[] buf,
int offset,
int length,
boolean isEnd)
Writes a buffer to the underlying stream. |
Methods inherited from class com.caucho.vfs.StreamImpl |
canRead, getAttribute, getAttributeNames, getAvailable, getFlushOnNewline, getNewline, getPath, getReadPosition, hasSkip, read, removeAttribute, setAttribute, setPath, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TempStream(Path backingDir)
Method Detail |
public void openWrite()
public void changeToBackingFile(int index) throws java.io.IOException
public boolean canWrite()
StreamImpl
canWrite
in class StreamImpl
public void write(byte[] buf, int offset, int length, boolean isEnd) throws java.io.IOException
StreamImpl
write
in class StreamImpl
com.caucho.vfs.StreamImpl
buffer
- 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.public void flush() throws java.io.IOException
StreamImpl
flush
in class StreamImpl
public void close() throws java.io.IOException
StreamImpl
close
in class StreamImpl
public ReadStream openRead() throws java.io.IOException
public ReadStream openRead(boolean free) throws java.io.IOException
free
- if true, frees the buffer as it's readpublic void openRead(ReadStream rs, boolean free) throws java.io.IOException
free
- if true, frees the buffer as it's readpublic int getLength()
public ReadStream openRead(ReadStream s) throws java.io.IOException
public void clearWrite()
StreamImpl
clearWrite
in class StreamImpl
public void discard()
public void destroy()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |