Class Pointer
java.lang.Object
com.github.junrar.unpack.ppm.Pointer
- Direct Known Subclasses:
FreqData, PPMContext, RarMemBlock, RarNode, State
Simulates Pointers on a single mem block as a byte[]
- Version:
- $LastChangedRevision$
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintreturns the position of this object in the byte[]voidsetAddress(int pos) needs to set the fields of this object to the values in the byte[] at the given position.
-
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
-