|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.vfs.StreamImpl
com.caucho.vfs.TempStream
public class TempStream
| Field Summary |
|---|
| Fields inherited from class com.caucho.vfs.StreamImpl |
|---|
_nullPath, _path |
| Constructor Summary | |
|---|---|
TempStream()
|
|
| Method Summary | |
|---|---|
boolean |
canWrite()
Returns true if this is a writable stream. |
void |
clearWrite()
Clears any buffered values in the write. |
TempStream |
copy()
Copies the temp stream; |
void |
destroy()
Clean up the temp stream. |
void |
discard()
|
void |
flush()
Flushes the write output. |
java.lang.String |
getEncoding()
Gets the encoding. |
TempBuffer |
getHead()
Returns the head buffer. |
java.io.InputStream |
getInputStream()
Returns an input stream to the contents, freeing the value automatically. |
int |
getLength()
Returns the total length of the buffer's bytes |
byte[] |
getTail()
|
java.io.InputStream |
openInputStream()
|
ReadStream |
openRead()
Opens a read stream to the buffer. |
void |
openRead(ReadStream rs)
Opens a read stream to the buffer. |
ReadStream |
openReadAndSaveBuffer()
Opens a read stream to the buffer. |
void |
openWrite()
Initializes the temp stream for writing. |
void |
setEncoding(java.lang.String encoding)
Sets the encoding. |
void |
write(byte[] buf,
int offset,
int length,
boolean isEnd)
Writes a chunk of data to the temp stream. |
void |
writeToStream(java.io.OutputStream os)
|
| Methods inherited from class com.caucho.vfs.StreamImpl |
|---|
canRead, close, closeWrite, flushBuffer, flushToDisk, getAttribute, getAttributeNames, getAvailable, getFlushOnNewline, getNewline, getPath, getReadBuffer, getReadPosition, hasSkip, isClosed, isEof, read, readNonBlock, readTimeout, removeAttribute, seekEnd, seekStart, setAttribute, setPath, setWriteEncoding, skip, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TempStream()
| Method Detail |
|---|
public void openWrite()
public byte[] getTail()
public void setEncoding(java.lang.String encoding)
public java.lang.String getEncoding()
public boolean canWrite()
StreamImpl
canWrite in class StreamImpl
public void write(byte[] buf,
int offset,
int length,
boolean isEnd)
throws java.io.IOException
write in interface TempStreamApiwrite in class StreamImplbuf - 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.IOException
public void flush()
throws java.io.IOException
StreamImpl
flush in class StreamImpljava.io.IOException
public ReadStream openRead()
throws java.io.IOException
openRead in interface TempStreamApijava.io.IOException
public ReadStream openReadAndSaveBuffer()
throws java.io.IOException
free - if true, frees the buffer as it's read
java.io.IOException
public void openRead(ReadStream rs)
throws java.io.IOException
java.io.IOException
public java.io.InputStream getInputStream()
throws java.io.IOException
java.io.IOException
public java.io.InputStream openInputStream()
throws java.io.IOException
java.io.IOExceptionpublic TempBuffer getHead()
public void writeToStream(java.io.OutputStream os)
throws java.io.IOException
java.io.IOExceptionpublic int getLength()
public void clearWrite()
StreamImpl
clearWrite in class StreamImplpublic void discard()
public TempStream copy()
public void destroy()
destroy in interface TempStreamApi
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||