byteblock
Class ByteBlockMultiWindow

java.lang.Object
  |
  +--byteblock.ByteBlockWindow
        |
        +--byteblock.ByteBlockMultiWindow

public class ByteBlockMultiWindow
extends ByteBlockWindow

Groups a list of byte block windows into a single logical window. Windows are added to a window list; bytes are written and read sequentially from the windows in the list.


Fields inherited from class byteblock.ByteBlockWindow
baseBlock
 
Constructor Summary
ByteBlockMultiWindow()
          Create a new multi-window, with an initially empty window list.
 
Method Summary
 void addWindow(ByteBlockWindow newWindow)
          Add the specified window to the end of the window list.
 void clearBytes()
          Set the bytes in all of the windows in the window list to 0x00.
 byte[] getBytes()
          Return the sequence of bytes in the windows, in the order in which the windows appear in the window list.
 int getSize()
          Return the total number of bytes, which equals the sum of the sizes of the windows in the window list.
 java.lang.String toHexString()
          Return the sequence of bytes in the windows in the window list, without spaces.
 java.lang.String toString()
          Return the sequence of bytes in the windows in the window list, with spaces.
 void writeBytes(byte[] byteString)
          Write a sequence of bytes into the window, writing the bytes sequentially into the windows in the window list.
 
Methods inherited from class byteblock.ByteBlockWindow
getHex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ByteBlockMultiWindow

public ByteBlockMultiWindow()
Create a new multi-window, with an initially empty window list.
Method Detail

addWindow

public void addWindow(ByteBlockWindow newWindow)
Add the specified window to the end of the window list.

getSize

public int getSize()
Return the total number of bytes, which equals the sum of the sizes of the windows in the window list.
Overrides:
getSize in class ByteBlockWindow

getBytes

public byte[] getBytes()
Return the sequence of bytes in the windows, in the order in which the windows appear in the window list.
Overrides:
getBytes in class ByteBlockWindow

clearBytes

public void clearBytes()
Set the bytes in all of the windows in the window list to 0x00.
Overrides:
clearBytes in class ByteBlockWindow

writeBytes

public void writeBytes(byte[] byteString)
Write a sequence of bytes into the window, writing the bytes sequentially into the windows in the window list. Note that this automatically clears the other bytes.
Overrides:
writeBytes in class ByteBlockWindow

toString

public java.lang.String toString()
Return the sequence of bytes in the windows in the window list, with spaces.
Overrides:
toString in class ByteBlockWindow

toHexString

public java.lang.String toHexString()
Return the sequence of bytes in the windows in the window list, without spaces.
Overrides:
toHexString in class ByteBlockWindow