Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.poifs.storage
Class SmallDocumentBlockList

    java.lang.Object
      org.apache.poi.poifs.storage.SmallDocumentBlockList

All Implemented Interfaces:
  BlockList

    public class SmallDocumentBlockList

extends java.lang.Object

A list of SmallDocumentBlocks instances, and methods to manage the list

Author:
  Marc Johnson (mjohnson at apache dot org)

Constructor Summary
`SmallDocumentBlockList(java.util.List blocks)` Constructor SmallDocumentBlockList

Method Summary
`int` | `blockCount()` Returns the count of the number of blocks
`ListManagedBlock[]` | `fetchBlocks(int startBlock, int headerPropertiesStartBlock)` get the blocks making up a particular stream in the list.
`ListManagedBlock` | `remove(int index)` remove and return the specified block from the list
`void` | `setBAT(BlockAllocationTableReader bat)` set the associated BlockAllocationTable
`void` | `zap(int index)` remove the specified block from the list

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SmallDocumentBlockList

    public SmallDocumentBlockList(java.util.List blocks)

  Constructor SmallDocumentBlockList

  Parameters:
    `blocks` - a list of SmallDocumentBlock instances

Method Detail

### zap

    public void zap(int index)

  remove the specified block from the list

  Specified by:
    `zap` in interface `BlockList`
  Parameters:
    `index` - the index of the specified block; if the index is out of range, that's ok

### remove

    public ListManagedBlock remove(int index)
                            throws java.io.IOException

  remove and return the specified block from the list

  Specified by:
    `remove` in interface `BlockList`
  Parameters:
    `index` - the index of the specified block
  Returns:
    the specified block
  Throws:
    `java.io.IOException` - if the index is out of range or has already been removed

### fetchBlocks

    public ListManagedBlock[] fetchBlocks(int startBlock,
                                          int headerPropertiesStartBlock)
                                   throws java.io.IOException

  get the blocks making up a particular stream in the list. The blocks are removed from the list.

  Specified by:
    `fetchBlocks` in interface `BlockList`
  Parameters:
    `startBlock` - the index of the first block in the stream
    `headerPropertiesStartBlock` - the index of the first header block in the stream
  Returns:
    the stream as an array of correctly ordered blocks
  Throws:
    `java.io.IOException` - if blocks are missing

### setBAT

    public void setBAT(BlockAllocationTableReader bat)
                throws java.io.IOException

  set the associated BlockAllocationTable

  Specified by:
    `setBAT` in interface `BlockList`
  Parameters:
    `bat` - the associated BlockAllocationTable
  Throws:
    `java.io.IOException`

### blockCount

    public int blockCount()

  Returns the count of the number of blocks

  Specified by:
    `blockCount` in interface `BlockList`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD