|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.util.buffer.FastShortBuffer
public class FastShortBuffer
Fast, fast short buffer.
| Constructor Summary | |
|---|---|
FastShortBuffer()
Creates a new short buffer. |
|
FastShortBuffer(int size)
Creates a new short buffer, with a buffer capacity of
the specified size, in bytes. |
|
| Method Summary | |
|---|---|
FastShortBuffer |
append(FastShortBuffer buff)
Appends another fast buffer to this one. |
FastShortBuffer |
append(short element)
Appends single short to buffer. |
FastShortBuffer |
append(short[] array)
Appends short array to buffer. |
FastShortBuffer |
append(short[] array,
int off,
int len)
Appends short array to buffer. |
short[] |
array(int index)
Returns short inner array chunk at given index. |
void |
clear()
Resets the buffer content. |
short |
get(int index)
Returns short element at given index. |
int |
index()
Returns current index of inner short array chunk. |
boolean |
isEmpty()
Tests if this buffer has no elements. |
int |
offset()
Returns the offset of last used element in current inner array chunk. |
int |
size()
Returns buffer size. |
short[] |
toArray()
Creates short array from buffered content. |
short[] |
toArray(int start,
int len)
Creates short subarray from buffered content. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FastShortBuffer()
short buffer. The buffer capacity is
initially 1024 bytes, though its size increases if necessary.
public FastShortBuffer(int size)
short buffer, with a buffer capacity of
the specified size, in bytes.
size - the initial size.
java.lang.IllegalArgumentException - if size is negative.| Method Detail |
|---|
public FastShortBuffer append(short[] array,
int off,
int len)
short array to buffer.
public FastShortBuffer append(short[] array)
short array to buffer.
public FastShortBuffer append(short element)
short to buffer.
public FastShortBuffer append(FastShortBuffer buff)
public int size()
public boolean isEmpty()
public int index()
short array chunk.
Represents the index of last used inner array chunk.
public int offset()
public short[] array(int index)
short inner array chunk at given index.
May be used for iterating inner chunks in fast manner.
public void clear()
public short[] toArray()
short array from buffered content.
public short[] toArray(int start,
int len)
short subarray from buffered content.
public short get(int index)
short element at given index.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||