public class CBufferReadWrite extends CDataReadWriteAccess
Constructor and Description |
---|
CBufferReadWrite(java.nio.ByteBuffer rawData,
long address,
int pointerSize) |
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
java.nio.ByteOrder |
getByteOrder() |
byte[] |
getBytes()
provides access to the native data buffer.
|
long |
offset() |
void |
offset(long offset) |
void |
padding(int alignment)
Same as
CDataReadWriteAccess.padding(int, boolean) with 'extend == false'. |
void |
padding(int alignment,
boolean extend)
Inserts padding at a given offset to fit a given alignment during reading or
writing in streams.
|
byte |
readByte() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] b,
int off,
int len) |
int |
readInt() |
long |
readInt64() |
short |
readShort() |
long |
skip(long n) |
void |
writeByte(int value) |
void |
writeDouble(double value) |
void |
writeFloat(float value) |
void |
writeInt(int value) |
void |
writeInt64(long value) |
void |
writeShort(short value) |
create, create, getPointerSize, readBoolean, readFully, readFully, readFully, readFully, readFully, readFully, readFullyInt64, readLong, writeBoolean, writeFully, writeFully, writeFully, writeFully, writeFully, writeFully, writeFully, writeFullyInt64, writeLong
public CBufferReadWrite(java.nio.ByteBuffer rawData, long address, int pointerSize)
public short readShort() throws java.io.IOException
readShort
in class CDataReadWriteAccess
java.io.IOException
public int readInt() throws java.io.IOException
readInt
in class CDataReadWriteAccess
java.io.IOException
public long readInt64() throws java.io.IOException
readInt64
in class CDataReadWriteAccess
java.io.IOException
public float readFloat() throws java.io.IOException
readFloat
in class CDataReadWriteAccess
java.io.IOException
public double readDouble() throws java.io.IOException
readDouble
in class CDataReadWriteAccess
java.io.IOException
public long offset() throws java.io.IOException
offset
in class CDataReadWriteAccess
java.io.IOException
public void offset(long offset) throws java.io.IOException
offset
in class CDataReadWriteAccess
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class CDataReadWriteAccess
java.io.IOException
public int available() throws java.io.IOException
available
in class CDataReadWriteAccess
java.io.IOException
public void padding(int alignment) throws java.io.IOException
CDataReadWriteAccess
CDataReadWriteAccess.padding(int, boolean)
with 'extend == false'.padding
in class CDataReadWriteAccess
alignment
- Requrested aligmentjava.io.IOException
public void padding(int alignment, boolean extend) throws java.io.IOException
CDataReadWriteAccess
padding
in class CDataReadWriteAccess
alignment
- Requrested aligmentextend
- Extend past boundary (write mode)java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public byte readByte() throws java.io.IOException
readByte
in class CDataReadWriteAccess
java.io.IOException
public void readFully(byte[] b, int off, int len) throws java.io.IOException
readFully
in class CDataReadWriteAccess
java.io.IOException
public void writeByte(int value) throws java.io.IOException
writeByte
in class CDataReadWriteAccess
java.io.IOException
public void writeShort(short value) throws java.io.IOException
writeShort
in class CDataReadWriteAccess
java.io.IOException
public void writeInt(int value) throws java.io.IOException
writeInt
in class CDataReadWriteAccess
java.io.IOException
public void writeInt64(long value) throws java.io.IOException
writeInt64
in class CDataReadWriteAccess
java.io.IOException
public void writeFloat(float value) throws java.io.IOException
writeFloat
in class CDataReadWriteAccess
java.io.IOException
public void writeDouble(double value) throws java.io.IOException
writeDouble
in class CDataReadWriteAccess
java.io.IOException
public java.nio.ByteOrder getByteOrder()
getByteOrder
in class CDataReadWriteAccess
public byte[] getBytes()