|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.nio.BufferFactory
final class BufferFactory
Provide factory service of buffer classes.
Since all buffer impl classes are package private (except DirectByteBuffer), this factory is the only entrance to access buffer functions from outside of the impl package.
| Constructor Summary | |
|---|---|
BufferFactory()
|
|
| Method Summary | |
|---|---|
static ByteBuffer |
newByteBuffer(byte[] array)
Returns a new byte buffer based on the specified byte array. |
static ByteBuffer |
newByteBuffer(int capacity)
Returns a new array based byte buffer with the specified capacity. |
static CharBuffer |
newCharBuffer(char[] array)
Returns a new char buffer based on the specified char array. |
static CharBuffer |
newCharBuffer(CharSequence chseq)
Returns a new readonly char buffer based on the specified char sequence. |
static CharBuffer |
newCharBuffer(int capacity)
Returns a new array based char buffer with the specified capacity. |
static ByteBuffer |
newDirectByteBuffer(int capacity)
Returns a new direct byte buffer with the specified capacity. |
static DoubleBuffer |
newDoubleBuffer(double[] array)
Returns a new double buffer based on the specified double array. |
static DoubleBuffer |
newDoubleBuffer(int capacity)
Returns a new array based double buffer with the specified capacity. |
static FloatBuffer |
newFloatBuffer(float[] array)
Returns a new float buffer based on the specified float array. |
static FloatBuffer |
newFloatBuffer(int capacity)
Returns a new array based float buffer with the specified capacity. |
static IntBuffer |
newIntBuffer(int capacity)
Returns a new array based int buffer with the specified capacity. |
static IntBuffer |
newIntBuffer(int[] array)
Returns a new int buffer based on the specified int array. |
static LongBuffer |
newLongBuffer(int capacity)
Returns a new array based long buffer with the specified capacity. |
static LongBuffer |
newLongBuffer(long[] array)
Returns a new long buffer based on the specified long array. |
static ShortBuffer |
newShortBuffer(int capacity)
Returns a new array based short buffer with the specified capacity. |
static ShortBuffer |
newShortBuffer(short[] array)
Returns a new short buffer based on the specified short array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
BufferFactory()
| Method Detail |
|---|
public static ByteBuffer newByteBuffer(byte[] array)
array - The byte array
public static ByteBuffer newByteBuffer(int capacity)
capacity - The capacity of the new buffer
public static CharBuffer newCharBuffer(char[] array)
array - The char array
public static CharBuffer newCharBuffer(CharSequence chseq)
chseq - The char sequence
public static CharBuffer newCharBuffer(int capacity)
capacity - The capacity of the new buffer
public static ByteBuffer newDirectByteBuffer(int capacity)
capacity - The capacity of the new buffer
public static DoubleBuffer newDoubleBuffer(double[] array)
array - The double array
public static DoubleBuffer newDoubleBuffer(int capacity)
capacity - The capacity of the new buffer
public static FloatBuffer newFloatBuffer(float[] array)
array - The float array
public static FloatBuffer newFloatBuffer(int capacity)
capacity - The capacity of the new buffer
public static IntBuffer newIntBuffer(int capacity)
capacity - The capacity of the new buffer
public static IntBuffer newIntBuffer(int[] array)
array - The int array
public static LongBuffer newLongBuffer(int capacity)
capacity - The capacity of the new buffer
public static LongBuffer newLongBuffer(long[] array)
array - The long array
public static ShortBuffer newShortBuffer(int capacity)
capacity - The capacity of the new buffer
public static ShortBuffer newShortBuffer(short[] array)
array - The short array
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||