byteblock
Class ByteBlockWindow
java.lang.Object
|
+--byteblock.ByteBlockWindow
- Direct Known Subclasses:
- ByteBlockMultiWindow, ByteBlockRectangularWindow
- public abstract class ByteBlockWindow
- extends java.lang.Object
Abstract base class for "windows" into byte blocks, which are used to
read and write data of various types.
Method Summary |
abstract void |
clearBytes()
Set all bytes in window to 0x00. |
abstract byte[] |
getBytes()
Return the sequence of bytes in the window. |
protected java.lang.String |
getHex(int b)
Return a hexadecimal pair representation of a byte. |
abstract int |
getSize()
Return the total number of bytes in the window. |
abstract java.lang.String |
toHexString()
Return a String representation of the data in the window,
as a string of hexadecimal pairs, without spaces. |
abstract java.lang.String |
toString()
Return a String representation of the data in the window,
as a string of hexadecimal pairs, separated by spaces. |
abstract void |
writeBytes(byte[] byteString)
Write a sequence of bytes into the window. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
baseBlock
protected ByteBlock baseBlock
ByteBlockWindow
public ByteBlockWindow()
getSize
public abstract int getSize()
- Return the total number of bytes in the window.
getBytes
public abstract byte[] getBytes()
- Return the sequence of bytes in the window.
clearBytes
public abstract void clearBytes()
- Set all bytes in window to 0x00.
writeBytes
public abstract void writeBytes(byte[] byteString)
- Write a sequence of bytes into the window. Note that this
automatically clears the other bytes.
toString
public abstract java.lang.String toString()
- Return a String representation of the data in the window,
as a string of hexadecimal pairs, separated by spaces.
- Overrides:
toString
in class java.lang.Object
toHexString
public abstract java.lang.String toHexString()
- Return a String representation of the data in the window,
as a string of hexadecimal pairs, without spaces.
getHex
protected java.lang.String getHex(int b)
- Return a hexadecimal pair representation of a byte.