public class AssemblyBuffer extends Object implements InputDisassembler, OutputAssembler
Modifier and Type | Field and Description |
---|---|
static int |
INITIAL_STRING_SIZE |
Constructor and Description |
---|
AssemblyBuffer() |
AssemblyBuffer(ByteBuffer in) |
AssemblyBuffer(ByteOrder order) |
Modifier and Type | Method and Description |
---|---|
void |
align(int alignment) |
void |
alignRead(int alignment) |
static InputDisassembler |
createInputDisassembler(ByteBuffer in) |
static OutputAssembler |
createOutputAssembler() |
static OutputAssembler |
createOutputAssembler(ByteBuffer out) |
static OutputAssembler |
createOutputAssembler(ByteOrder order) |
boolean |
eof() |
void |
even() |
byte[] |
getBlob() |
ByteBuffer |
getBuffer() |
ByteOrder |
getByteOrder() |
void |
pop() |
int |
pos() |
void |
pushPos() |
void |
pushSeek(long pos) |
void |
pushSkip(long diff) |
short |
read2Byte() |
int |
read4Byte() |
long |
read8Byte() |
byte[] |
readBlob(int length) |
byte |
readByte() |
long |
readLEB128() |
long |
readQuad() |
long |
readSLEB128() |
long |
readTruncatedLong(int truncateTo) |
char |
readUbyte() |
short |
readValue() |
String |
readZeroTerminatedString() |
void |
seek(long pos) |
void |
setByteOrder(ByteOrder byteOrder) |
void |
skip(int n) |
void |
skip(long diff) |
void |
write2Byte(short i) |
void |
write4Byte(int w) |
void |
write8Byte(long w) |
void |
writeBCD(double f) |
void |
writeBlob(byte[] blob) |
void |
writeByte(byte b) |
void |
writeDouble(double f) |
void |
writeFloat(float f) |
void |
writeLEB128(long v) |
void |
writeQuad(long w) |
void |
writeSLEB128(long v) |
void |
writeString(String s) |
void |
writeStringPadded(String s,
int nBytes) |
void |
writeTruncatedLong(long value,
int truncateTo) |
void |
writeValue(short i) |
void |
writeZero(int n) |
public static final int INITIAL_STRING_SIZE
public AssemblyBuffer(ByteBuffer in)
public AssemblyBuffer(ByteOrder order)
public AssemblyBuffer()
public static InputDisassembler createInputDisassembler(ByteBuffer in)
public static OutputAssembler createOutputAssembler(ByteBuffer out)
public static OutputAssembler createOutputAssembler(ByteOrder order)
public static OutputAssembler createOutputAssembler()
public boolean eof()
eof
in interface InputDisassembler
eof
in interface OutputAssembler
public void seek(long pos)
seek
in interface InputDisassembler
seek
in interface OutputAssembler
public void skip(long diff)
skip
in interface InputDisassembler
skip
in interface OutputAssembler
public void pushSeek(long pos)
pushSeek
in interface InputDisassembler
pushSeek
in interface OutputAssembler
public void pushSkip(long diff)
pushSkip
in interface InputDisassembler
pushSkip
in interface OutputAssembler
public void pushPos()
pushPos
in interface InputDisassembler
pushPos
in interface OutputAssembler
public void pop()
pop
in interface InputDisassembler
pop
in interface OutputAssembler
public int pos()
pos
in interface InputDisassembler
pos
in interface OutputAssembler
public void align(int alignment)
align
in interface OutputAssembler
public void even()
even
in interface InputDisassembler
even
in interface OutputAssembler
public void writeZero(int n)
writeZero
in interface OutputAssembler
public void writeLEB128(long v)
writeLEB128
in interface OutputAssembler
public void writeSLEB128(long v)
writeSLEB128
in interface OutputAssembler
public void writeBCD(double f)
writeBCD
in interface OutputAssembler
public void writeFloat(float f)
writeFloat
in interface OutputAssembler
public void writeDouble(double f)
writeDouble
in interface OutputAssembler
public void writeByte(byte b)
writeByte
in interface OutputAssembler
public void write4Byte(int w)
write4Byte
in interface OutputAssembler
public void writeBlob(byte[] blob)
writeBlob
in interface OutputAssembler
public void write2Byte(short i)
write2Byte
in interface OutputAssembler
public void writeValue(short i)
writeValue
in interface OutputAssembler
public void write8Byte(long w)
write8Byte
in interface OutputAssembler
public void writeQuad(long w)
writeQuad
in interface OutputAssembler
public void writeString(String s)
writeString
in interface OutputAssembler
public void writeStringPadded(String s, int nBytes)
writeStringPadded
in interface OutputAssembler
public ByteBuffer getBuffer()
getBuffer
in interface InputDisassembler
getBuffer
in interface OutputAssembler
public byte[] getBlob()
getBlob
in interface OutputAssembler
public void setByteOrder(ByteOrder byteOrder)
setByteOrder
in interface InputDisassembler
setByteOrder
in interface OutputAssembler
public void skip(int n)
skip
in interface InputDisassembler
skip
in interface OutputAssembler
public ByteOrder getByteOrder()
getByteOrder
in interface InputDisassembler
getByteOrder
in interface OutputAssembler
public void alignRead(int alignment)
alignRead
in interface InputDisassembler
public int read4Byte()
read4Byte
in interface InputDisassembler
public byte readByte()
readByte
in interface InputDisassembler
public char readUbyte()
readUbyte
in interface InputDisassembler
public short read2Byte()
read2Byte
in interface InputDisassembler
public short readValue()
readValue
in interface InputDisassembler
public long read8Byte()
read8Byte
in interface InputDisassembler
public long readQuad()
readQuad
in interface InputDisassembler
public void writeTruncatedLong(long value, int truncateTo)
writeTruncatedLong
in interface OutputAssembler
public long readTruncatedLong(int truncateTo)
readTruncatedLong
in interface InputDisassembler
public String readZeroTerminatedString()
readZeroTerminatedString
in interface InputDisassembler
public long readLEB128()
readLEB128
in interface InputDisassembler
public long readSLEB128()
readSLEB128
in interface InputDisassembler
public byte[] readBlob(int length)
readBlob
in interface InputDisassembler