Class Pointer

java.lang.Object
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$
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected byte[]
     
    protected int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Pointer(byte[] mem)
    Initialize the object with the array (may be null)
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    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 Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • mem

      protected byte[] mem
    • pos

      protected int pos
  • Constructor Details

    • Pointer

      public Pointer(byte[] mem)
      Initialize the object with the array (may be null)
      Parameters:
      mem - the byte array
  • Method Details

    • 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