FileDocCategorySizeDatePackage
PlexOfCps.javaAPI DocApache Poi 3.0.12519Mon Jan 01 18:55:22 GMT 2007org.apache.poi.hdf.model.hdftypes

PlexOfCps

public class PlexOfCps extends Object
common data structure in a Word file. Contains an array of 4 byte ints in the front that relate to an array of abitrary data structures in the back. This class acts more like a pointer. In the sense that it doesn't store any data. It only provides convenience methods for accessing a particular PlexOfCps
author
Ryan Ackley

Fields Summary
private int
_count
private int
_offset
private int
_sizeOfStruct
Constructors Summary
public PlexOfCps(int size, int sizeOfStruct)
Constructor

param
size The size in bytes of this PlexOfCps
param
sizeOfStruct The size of the data structure type stored in this PlexOfCps.

        _count = (size - 4)/(4 + sizeOfStruct);
        _sizeOfStruct = sizeOfStruct;
    
Methods Summary
public intgetIntOffset(int index)

      return index * 4;
    
public intgetStructOffset(int index)
Returns the offset, in bytes, from the beginning if this PlexOfCps to the data structure at index.

param
index The index of the data structure.
return
The offset, in bytes, from the beginning if this PlexOfCps to the data structure at index.

        return (4 * (_count + 1)) + (_sizeOfStruct * index);
    
public intlength()
returns the number of data structures in this PlexOfCps.

return
The number of data structures in this PlexOfCps

        return _count;