org.apache.poi.poifs.storage
Class HeaderBlockReader

java.lang.Object
  extended by org.apache.poi.poifs.storage.HeaderBlockReader

public final class HeaderBlockReader
extends java.lang.Object

The block containing the archive header

Author:
Marc Johnson (mjohnson at apache dot org)

Field Summary
static int _bat_array_offset
           
static int _bat_count_offset
           
static int _max_bats_in_header
           
static int _property_start_offset
           
static int _sbat_block_count_offset
           
static int _sbat_start_offset
           
static long _signature
           
static int _signature_offset
           
static int _xbat_count_offset
           
static int _xbat_start_offset
           
 
Constructor Summary
HeaderBlockReader(java.io.InputStream stream)
          create a new HeaderBlockReader from an InputStream
 
Method Summary
 int[] getBATArray()
          Returns the offsets to the first (up to) 109 BAT sectors.
 int getBATCount()
           
 POIFSBigBlockSize getBigBlockSize()
           
 int getPropertyStart()
          get start of Property Table
 int getSBATCount()
           
 int getSBATStart()
           
 int getXBATCount()
           
 int getXBATIndex()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_signature

public static final long _signature
See Also:
Constant Field Values

_bat_array_offset

public static final int _bat_array_offset
See Also:
Constant Field Values

_max_bats_in_header

public static final int _max_bats_in_header
See Also:
Constant Field Values

_signature_offset

public static final int _signature_offset
See Also:
Constant Field Values

_bat_count_offset

public static final int _bat_count_offset
See Also:
Constant Field Values

_property_start_offset

public static final int _property_start_offset
See Also:
Constant Field Values

_sbat_start_offset

public static final int _sbat_start_offset
See Also:
Constant Field Values

_sbat_block_count_offset

public static final int _sbat_block_count_offset
See Also:
Constant Field Values

_xbat_start_offset

public static final int _xbat_start_offset
See Also:
Constant Field Values

_xbat_count_offset

public static final int _xbat_count_offset
See Also:
Constant Field Values
Constructor Detail

HeaderBlockReader

public HeaderBlockReader(java.io.InputStream stream)
                  throws java.io.IOException
create a new HeaderBlockReader from an InputStream

Parameters:
stream - the source InputStream
Throws:
java.io.IOException - on errors or bad data
Method Detail

getPropertyStart

public int getPropertyStart()
get start of Property Table

Returns:
the index of the first block of the Property Table

getSBATStart

public int getSBATStart()
Returns:
start of small block (MiniFAT) allocation table

getSBATCount

public int getSBATCount()

getBATCount

public int getBATCount()
Returns:
number of BAT blocks

getBATArray

public int[] getBATArray()
Returns the offsets to the first (up to) 109 BAT sectors. Any additional BAT sectors

Returns:
BAT offset array

getXBATCount

public int getXBATCount()
Returns:
XBAT (DIFAT) count

getXBATIndex

public int getXBATIndex()
Returns:
XBAT (DIFAT) index

getBigBlockSize

public POIFSBigBlockSize getBigBlockSize()
Returns:
The Big Block size, normally 512 bytes, sometimes 4096 bytes