|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.dexterim.oscar.OscarByteBuffer
Constructor Summary | |
OscarByteBuffer()
|
Method Summary | |
static OscarByteBuffer |
allocate(int size)
Allocates a static OscarByteBuffer with size size. |
abstract byte[] |
array()
Returns the underlying data structure as byte array. |
static OscarByteBuffer |
dynamic()
Allocates a dynamic OscarByteBuffer. |
abstract int |
fill()
Returns last position with data available |
abstract int |
getByte()
Returns byte at current position. |
abstract DWord |
getDWord()
Returns the data chunk at current position as DWord. |
abstract Word |
getWord()
Returns the data chunk at current position as Word. |
abstract int |
position()
Returns the current position. |
abstract int |
position(int position)
Sets the position to newPosition and returns the old position. |
abstract int |
size()
Returns the current size of the buffer. |
abstract byte[] |
slice()
Returns the underlying data structure as byte array. |
abstract int |
strip()
Strips the OscarByteBuffer by setting the fill to the current position. |
static OscarByteBuffer |
wrap(byte[] data)
Creates a new OscarByteBuffer instance that wraps the data byte[] |
static OscarByteBuffer |
wrapDynamic(byte[] data)
Allocates a dynamic OscarByteBuffer that wraps a byte[] and sets position() to data.length. |
abstract OscarByteBuffer |
write(byte source)
Writes a byte value at current position. |
abstract OscarByteBuffer |
write(ByteBased source)
Writes a ByteBased value at current position. |
abstract OscarByteBuffer |
write(OscarByteBuffer source)
Writes a OscarByteBuffer value at current position. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OscarByteBuffer()
Method Detail |
public abstract int position(int position)
position
- new Position
public abstract int position()
public abstract int size()
public abstract int fill()
public abstract int strip()
public abstract Word getWord()
public abstract DWord getDWord()
public abstract int getByte()
public abstract OscarByteBuffer write(ByteBased source)
source
- value to write to buffer
public abstract OscarByteBuffer write(byte source)
source
- value to write to buffer
public abstract OscarByteBuffer write(OscarByteBuffer source)
source
- value to write to buffer
public abstract byte[] array()
public abstract byte[] slice()
public static OscarByteBuffer wrap(byte[] data)
data
- byte[] to wrap
public static OscarByteBuffer allocate(int size)
size
- size of the new OscarByteBuffer
public static OscarByteBuffer dynamic()
public static OscarByteBuffer wrapDynamic(byte[] data)
data
- byte[] to wrap
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |