com.github.junrar.unpack.ppm
Class Pointer

java.lang.Object
  extended by com.github.junrar.unpack.ppm.Pointer
Direct Known Subclasses:
FreqData, PPMContext, RarMemBlock, RarNode, State

public abstract class Pointer
extends Object

Simulates Pointers on a single mem block as a byte[]

Version:
$LastChangedRevision$
Author:
$LastChangedBy$

Field Summary
protected  byte[] mem
           
protected  int pos
           
 
Constructor Summary
Pointer(byte[] mem)
          Initialize the object with the array (may be null)
 
Method Summary
 int getAddress()
          returns the position of this object in the byte[]
 void setAddress(int pos)
          needs to set the fields of this object to the values in the byte[] at the given position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mem

protected byte[] mem

pos

protected int pos
Constructor Detail

Pointer

public Pointer(byte[] mem)
Initialize the object with the array (may be null)

Parameters:
mem - the byte array
Method Detail

getAddress

public int getAddress()
returns the position of this object in the byte[]

Returns:
the address of this object

setAddress

public void setAddress(int pos)
needs to set the fields of this object to the values in the byte[] at the given position. be aware of the byte order

Parameters:
pos - the position this object should point to


Copyright © 2012. All Rights Reserved.