class ShortArrayCache
extends java.lang.Object
Constructor and Description |
---|
ShortArrayCache() |
Modifier and Type | Method and Description |
---|---|
short[] |
allocateShortArray(int minSize)
Allocates a short array with length/size greater than or equal
to a specific number.
|
void |
deallocateShortArray(short[] shortArray)
Returns a specific non-null short array into the
cache/pool implemented by this instance.
|
short[] |
validateShortArraySize(javax.media.Buffer buffer,
int newSize)
Ensures that the data property of a specific Buffer is
set to an short array with length/size greater than or equal to
a specific number.
|
public short[] allocateShortArray(int minSize)
minSize
- the minimum length/size of the array to be returnedpublic void deallocateShortArray(short[] shortArray)
shortArray
- the short array to be returned into the
cache/pool implemented by this instance. If null, the method
does nothing.public short[] validateShortArraySize(javax.media.Buffer buffer, int newSize)
buffer
- the Buffer the data property of which is
to be validatednewSize
- the minimum length/size of the short array to be
set as the value of the data property of the specified
buffer and to be returned
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.