public class SimpleByteBuffer
extends java.lang.Object
| Constructor and Description |
|---|
SimpleByteBuffer() |
| Modifier and Type | Method and Description |
|---|---|
void |
fill(byte b,
int pos,
int length)
Fill the buffer between pos (incl.) and pos+length with 'b' bytes.
|
byte[] |
getAsArray()
Return the buffer as a byte array.
|
byte[] |
getAsArray(int start)
Return a sub-buffer.
|
int |
getPos()
return the cursor position.
|
int |
getSize() |
void |
seek(int i) |
void |
writeByte(int b) |
void |
writeIntBigEndian(int k) |
void |
writeShortBigEndian(int a) |
void |
writeShortLittleEndian(int a) |
void |
writeToStream(java.io.OutputStream out)
Writes the buffer to an outputstream.
|
public void seek(int i)
public int getPos()
public int getSize()
public void writeByte(int b)
public void writeShortBigEndian(int a)
public void writeIntBigEndian(int k)
public void writeShortLittleEndian(int a)
public void writeToStream(java.io.OutputStream out)
throws java.io.IOException
java.io.IOExceptionpublic byte[] getAsArray()
public byte[] getAsArray(int start)
start - public void fill(byte b,
int pos,
int length)
b - pos - length -