com.caucho.vfs
Class TempCharBuffer

java.lang.Object
  extended by com.caucho.vfs.TempCharBuffer

public class TempCharBuffer
extends java.lang.Object


Field Summary
static int SIZE
           
 
Constructor Summary
TempCharBuffer(int size)
          Create a new TempBuffer.
 
Method Summary
static TempCharBuffer allocate()
          Allocate a TempCharBuffer, reusing one if available.
 void clear()
          Clears the buffer.
static void free(TempCharBuffer buf)
          Frees a single buffer.
static void freeAll(TempCharBuffer buf)
           
 int getAvailable()
           
 char[] getBuffer()
          Returns the buffer's underlying char array.
 int getCapacity()
           
 int getLength()
          Returns the number of chars in the buffer.
 TempCharBuffer getNext()
           
 void setLength(int length)
           
 void setNext(TempCharBuffer next)
           
 int write(char[] buf, int offset, int length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIZE

public static final int SIZE
Constructor Detail

TempCharBuffer

public TempCharBuffer(int size)
Create a new TempBuffer.

Method Detail

allocate

public static TempCharBuffer allocate()
Allocate a TempCharBuffer, reusing one if available.


clear

public void clear()
Clears the buffer.


getBuffer

public final char[] getBuffer()
Returns the buffer's underlying char array.


getLength

public final int getLength()
Returns the number of chars in the buffer.


setLength

public final void setLength(int length)

getCapacity

public final int getCapacity()

getAvailable

public int getAvailable()

getNext

public final TempCharBuffer getNext()

setNext

public final void setNext(TempCharBuffer next)

write

public int write(char[] buf,
                 int offset,
                 int length)

free

public static void free(TempCharBuffer buf)
Frees a single buffer.


freeAll

public static void freeAll(TempCharBuffer buf)