public class FastShortBuffer
extends java.lang.Object
short
buffer.Constructor and Description |
---|
FastShortBuffer()
Creates a new
short buffer. |
FastShortBuffer(int size)
Creates a new
short buffer, with a buffer capacity of
the specified size. |
Modifier and Type | Method and Description |
---|---|
FastShortBuffer |
append(FastShortBuffer buff)
Appends another fast buffer to this one.
|
void |
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. |
void |
clear()
Resets the buffer content.
|
short |
get(int index)
Returns
short element at given index. |
boolean |
isEmpty()
Tests if this buffer has no elements.
|
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. |
public FastShortBuffer()
short
buffer. The buffer capacity is
initially 64 shorts, though its size increases if necessary.public FastShortBuffer(int size)
short
buffer, with a buffer capacity of
the specified size.size
- the initial size.java.lang.IllegalArgumentException
- if size is negative.public void append(short element)
short
to buffer.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(FastShortBuffer buff)
public int size()
public boolean isEmpty()
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.Copyright © 2003-present Jodd Team