FileDocCategorySizeDatePackage
FIBShortHandler.javaAPI DocApache Poi 3.0.12373Mon Jan 01 18:55:34 GMT 2007org.apache.poi.hwpf.model

FIBShortHandler

public class FIBShortHandler extends Object

Fields Summary
public static final int
MAGICCREATED
public static final int
MAGICREVISED
public static final int
MAGICCREATEDPRIVATE
public static final int
MAGICREVISEDPRIVATE
public static final int
LIDFE
static final int
START
short[]
_shorts
Constructors Summary
public FIBShortHandler(byte[] mainStream)


    
  
    int offset = START;
    int shortCount = LittleEndian.getShort(mainStream, offset);
    offset += LittleEndian.SHORT_SIZE;
    _shorts = new short[shortCount];

    for (int x = 0; x < shortCount; x++)
    {
      _shorts[x] = LittleEndian.getShort(mainStream, offset);
      offset += LittleEndian.SHORT_SIZE;
    }
  
Methods Summary
public shortgetShort(int shortCode)

    return _shorts[shortCode];
  
voidserialize(byte[] mainStream)

    int offset = START;
    LittleEndian.putShort(mainStream, offset, (short)_shorts.length);
    offset += LittleEndian.SHORT_SIZE;
    //mainStream.write(holder);

    for (int x = 0; x < _shorts.length; x++)
    {
      LittleEndian.putShort(mainStream, offset, _shorts[x]);
      offset += LittleEndian.SHORT_SIZE;
    }
  
intsizeInBytes()

    return (_shorts.length * LittleEndian.SHORT_SIZE) + LittleEndian.SHORT_SIZE;