com.caucho.vfs
Class TempCharStream

java.lang.Object
  extended by com.caucho.vfs.StreamImpl
      extended by com.caucho.vfs.TempCharStream

public class TempCharStream
extends StreamImpl


Field Summary
 
Fields inherited from class com.caucho.vfs.StreamImpl
_nullPath, _path
 
Constructor Summary
TempCharStream()
           
 
Method Summary
 boolean canWrite()
          Returns true since the temp stream can write.
 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.
 TempCharBuffer getHead()
          Returns the head.
 int getLength()
          Returns the total length of the buffer's bytes
 char[] getTail()
          Returns the tail buffer.
 void openWrite()
          Initializes the temp stream for writing.
 void write(char[] buf, int offset, int length)
           
 void write(int ch)
           
 void write(java.lang.String s, int offset, int length)
          Writes part of a string.
 
Methods inherited from class com.caucho.vfs.StreamImpl
canRead, 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, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TempCharStream

public TempCharStream()
Method Detail

openWrite

public void openWrite()
Initializes the temp stream for writing.


getTail

public char[] getTail()
Returns the tail buffer.


getHead

public TempCharBuffer getHead()
Returns the head.


canWrite

public boolean canWrite()
Returns true since the temp stream can write.

Overrides:
canWrite in class StreamImpl

write

public void write(char[] buf,
                  int offset,
                  int length)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(java.lang.String s,
                  int offset,
                  int length)
           throws java.io.IOException
Writes part of a string.

Throws:
java.io.IOException

write

public void write(int ch)
           throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Description copied from class: StreamImpl
Flushes the write output.

Overrides:
flush in class StreamImpl
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Description copied from class: StreamImpl
Closes the stream.

Overrides:
close in class StreamImpl
Throws:
java.io.IOException

getLength

public int getLength()
Returns the total length of the buffer's bytes


clearWrite

public void clearWrite()
Description copied from class: StreamImpl
Clears any buffered values in the write.

Overrides:
clearWrite in class StreamImpl

discard

public void discard()

destroy

public void destroy()
Clean up the temp stream.