|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object frysk.value.Location
public abstract class Location
Location of a variable. An sequence of bytes accessable using get/put methods. The underlying buffer does NOT have an implict byte-ordering (technically this makes the buffer big-endian). Instead, code needing to interpret a sequence of bytes as having a particular ordering (little, big, et.al.) must specify that ordering explicitly.
Constructor Summary | |
---|---|
protected |
Location()
Permit extension by anyone. |
Method Summary | |
---|---|
byte[] |
get(ByteOrder order)
Get the entire contents of the location as a big-endian array of bytes. |
abstract long |
getAddress()
|
protected abstract byte |
getByte(long idx)
Return the byte at IDX. |
abstract long |
length()
The length of the location, in bytes. |
void |
put(ByteOrder order,
byte[] bytes,
int fill)
Put the big-endian BYTES into the least-significant end of Location; if there insufficient bytes, pad the most sigificant end with FILL (treated as a byte); if there are too may bytes truncate the most significant end. |
protected abstract void |
putByte(long idx,
byte value)
Poke the byte at IDX. |
protected abstract Location |
slice(long offset,
long length)
Return a slice of this Location starting at byte OFFSET, and going for LENGTH bytes. |
byte[] |
toByteArray()
Return the entire contents of the location as a sequence of raw bytes. |
abstract void |
toPrint(PrintWriter writer)
Print this Location. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected Location()
Method Detail |
---|
public String toString()
toString
in class Object
public byte[] get(ByteOrder order)
public byte[] toByteArray()
public void put(ByteOrder order, byte[] bytes, int fill)
protected abstract Location slice(long offset, long length)
protected abstract byte getByte(long idx)
protected abstract void putByte(long idx, byte value)
public abstract long length()
public abstract void toPrint(PrintWriter writer)
public abstract long getAddress()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |