|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.vfs.TempBuffer
public class TempBuffer
Pooled temporary byte buffer.
| Field Summary | |
|---|---|
static int |
SIZE
|
| Constructor Summary | |
|---|---|
TempBuffer(int size)
Create a new TempBuffer. |
|
| Method Summary | |
|---|---|
static TempBuffer |
allocate()
Allocate a TempBuffer, reusing one if available. |
void |
clear()
Clears the buffer. |
static TempBuffer |
copyFromStream(ReadStream is)
|
static void |
free(TempBuffer buf)
Frees a single buffer. |
static void |
freeAll(TempBuffer buf)
|
int |
getAvailable()
|
byte[] |
getBuffer()
Returns the buffer's underlying byte array. |
int |
getCapacity()
|
int |
getLength()
Returns the number of bytes in the buffer. |
TempBuffer |
getNext()
|
static boolean |
isSmallmem()
Returns true for a smallmem configuration |
void |
setLength(int length)
Sets the number of bytes used in the buffer. |
void |
setNext(TempBuffer next)
|
int |
write(byte[] 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 |
|---|
public static final int SIZE
| Constructor Detail |
|---|
public TempBuffer(int size)
| Method Detail |
|---|
public static boolean isSmallmem()
public static TempBuffer allocate()
public void clear()
public final byte[] getBuffer()
public final int getLength()
public final void setLength(int length)
public final int getCapacity()
public int getAvailable()
public final TempBuffer getNext()
public final void setNext(TempBuffer next)
public int write(byte[] buf,
int offset,
int length)
public static TempBuffer copyFromStream(ReadStream is)
throws java.io.IOException
java.io.IOExceptionpublic static void free(TempBuffer buf)
public static void freeAll(TempBuffer buf)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||