frysk.debuginfo
Class Piece

java.lang.Object
  extended by frysk.debuginfo.Piece
Direct Known Subclasses:
MemoryPiece, RegisterPiece, UnavailablePiece

public abstract class Piece
extends Object


Field Summary
protected  long size
           
 
Constructor Summary
Piece(long size)
           
 
Method Summary
abstract  boolean equals(Object p)
          Function that checks if the contents of two pieces are equal.
protected abstract  byte getByte(long index)
           
 long getSize()
           
protected abstract  void putByte(long index, byte value)
           
 void setSize(long size)
           
protected abstract  Piece slice(long offset, long length)
          Function to slice a Piece - slices a piece from byte OFFSET going for LENGTH bytes.
protected abstract  void toPrint(PrintWriter writer)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

size

protected long size
Constructor Detail

Piece

public Piece(long size)
Method Detail

getSize

public long getSize()

setSize

public void setSize(long size)

slice

protected abstract Piece slice(long offset,
                               long length)
Function to slice a Piece - slices a piece from byte OFFSET going for LENGTH bytes.

Parameters:
offset - - byte position where slice should start from
length - - number of bytes to be sliced
Returns:
slice

getByte

protected abstract byte getByte(long index)

putByte

protected abstract void putByte(long index,
                                byte value)

toPrint

protected abstract void toPrint(PrintWriter writer)

equals

public abstract boolean equals(Object p)
Function that checks if the contents of two pieces are equal.

Overrides:
equals in class Object
Parameters:
p - Piece to be compared with
Returns:
true/false