public class ShortBuffer extends java.lang.Object implements WritableToDataOutputStream
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
VERSION |
Constructor and Description |
---|
ShortBuffer()
Create an empty Buffer
|
ShortBuffer(byte[] data)
Create a Buffer from a byte array
|
ShortBuffer(byte[] data,
int start,
int length) |
ShortBuffer(java.io.DataInput dis)
Create a Buffer by reading a DataInputStream
|
Modifier and Type | Method and Description |
---|---|
byte |
byteAt(int pos) |
void |
copyTo(byte[] array,
int position)
Copy the data to a byte array
|
boolean |
equals(java.lang.Object o) |
byte[] |
getData()
Retrieve a byte array containing the data in this buffer.
|
int |
getLength() |
int |
hashCode() |
java.lang.String |
toString() |
void |
writeToDataOutputStream(java.io.DataOutputStream stream) |
public static final java.lang.String VERSION
public ShortBuffer(java.io.DataInput dis) throws java.io.IOException
dis
- to read bytes fromjava.lang.IllegalArgumentException
- If the length integer is negative.java.io.IOException
- error reading from dispublic ShortBuffer()
public ShortBuffer(byte[] data)
data
- public ShortBuffer(byte[] data, int start, int length)
public byte[] getData()
public void copyTo(byte[] array, int position)
array
- position
- public byte byteAt(int pos)
public void writeToDataOutputStream(java.io.DataOutputStream stream) throws java.io.IOException
writeToDataOutputStream
in interface WritableToDataOutputStream
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int getLength()