Java java.nio ShortBuffer fields, constructors, methods, implement or subclass

Example usage for Java java.nio ShortBuffer fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.nio ShortBuffer.

The text is from its open source code.

Method

ShortBufferallocate(int capacity)
Creates a short buffer based on a newly allocated short array.
short[]array()
Returns the short array which this buffer is based on, if there is one.
intarrayOffset()
Returns the offset of the short array which this buffer is based on, if there is one.
ShortBufferasReadOnlyBuffer()
Returns a read-only buffer that shares its content with this buffer.
intcapacity()
Returns the capacity of this buffer.
Bufferclear()
Clears this buffer.
ShortBuffercompact()
Compacts this short buffer.
intcompareTo(ShortBuffer otherBuffer)
Compare the remaining shorts of this buffer to another short buffer's remaining shorts.
ShortBufferduplicate()
Returns a duplicated buffer that shares its content with this buffer.
booleanequals(Object other)
Checks whether this short buffer is equal to another object.
Bufferflip()
Flips this buffer.
shortget()
Returns the short at the current position and increases the position by 1.
ShortBufferget(short[] dest)
Reads shorts from the current position into the specified short array and increases the position by the number of shorts read.
shortget(int index)
Returns the short at the specified index; the position is not changed.
ShortBufferget(short[] dest, int off, int len)
Reads shorts from the current position into the specified short array, starting from the specified offset, and increases the position by the number of shorts read.
booleanhasArray()
Indicates whether this buffer is based on a short array and is read/write.
inthashCode()
Calculates this buffer's hash code from the remaining chars.
booleanhasRemaining()
Indicates if there are elements remaining in this buffer, that is if position < limit .
booleanisDirect()
Indicates whether this buffer is direct.
intlimit()
Returns the limit of this buffer.
Buffermark()
Marks the current position, so that the position may return to this point later by calling reset().
ByteOrderorder()
Returns the byte order used by this buffer when converting shorts from/to bytes.
intposition()
Returns the position of this buffer.
Bufferposition(int newPosition)
Sets the position of this buffer.
ShortBufferput(short s)
Writes the given short to the current position and increases the position by 1.
ShortBufferput(short[] src)
Writes shorts from the given short array to the current position and increases the position by the number of shorts written.
ShortBufferput(ShortBuffer src)
Writes all the remaining shorts of the src short buffer to this buffer's current position, and increases both buffers' position by the number of shorts copied.
ShortBufferput(short[] src, int off, int len)
Writes shorts from the given short array, starting from the specified offset, to the current position and increases the position by the number of shorts written.
ShortBufferput(int index, short s)
Writes a short to the specified index of this buffer; the position is not changed.
intremaining()
Returns the number of remaining elements in this buffer, that is limit - position .
Bufferreset()
Resets the position of this buffer to the mark.
Bufferrewind()
Rewinds this buffer.
ShortBufferslice()
Returns a sliced buffer that shares its content with this buffer.
StringtoString()
Returns a string representing the state of this short buffer.
ShortBufferwrap(short[] array)
Creates a new short buffer by wrapping the given short array.
ShortBufferwrap(short[] array, int start, int len)
Creates a new short buffer by wrapping the given short array.