org.eclipse.mat.parser.index

## Class IndexReader.SizeIndexReader

- java.lang.Object
- - org.eclipse.mat.parser.index.IndexReader.SizeIndexReader

All Implemented Interfaces:
  IIndexReader, IIndexReader.IOne2OneIndex, IIndexReader.IOne2SizeIndex

Enclosing class:
  IndexReader

    public static class IndexReader.SizeIndexReader
    extends Object
    implements IIndexReader.IOne2SizeIndex

Creates a index reader for array sizes, presuming the sizes are stored as ints and get expanded in the reverse of the compression.

Since:
  1.0

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.eclipse.mat.parser.index.IIndexReader

`IIndexReader.IOne2LongIndex, IIndexReader.IOne2ManyIndex, IIndexReader.IOne2ManyObjectsIndex, IIndexReader.IOne2OneIndex, IIndexReader.IOne2SizeIndex`

### Constructor Summary

Constructors
Constructor and Description
`SizeIndexReader(File indexFile)` Constructor used when reopening a dump
`SizeIndexReader(IIndexReader.IOne2OneIndex idx)` Construct a size index reader based on a int index holding the compressed data

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()` Delegate to the int index.
`void` `delete()` Delegate to the int index.
`int` `get(int index)` Get the (compressed) size.
`int[]` `getAll(int[] index)` Delegate to the int index.
`int[]` `getNext(int index, int length)` Delegate to the int index.
`long` `getSize(int index)` Expand the compressed size.
`int` `size()` Delegate to the int index.
`void` `unload()` Delegate to the int index.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SizeIndexReader

    public SizeIndexReader(File indexFile)
                    throws IOException

Constructor used when reopening a dump

Parameters:
  `indexFile` -
Throws:
  `IOException`

#### SizeIndexReader

    public SizeIndexReader(IIndexReader.IOne2OneIndex idx)

Construct a size index reader based on a int index holding the compressed data

Parameters:
  `idx` -

### Method Detail

#### getSize

    public long getSize(int index)

Expand the compressed size.

Specified by:
  `getSize` in interface `IIndexReader.IOne2SizeIndex`

#### get

    public int get(int index)

Get the (compressed) size. Delegate to the int index.

Specified by:
  `get` in interface `IIndexReader.IOne2OneIndex`

#### getAll

    public int[] getAll(int[] index)

Delegate to the int index.

Specified by:
  `getAll` in interface `IIndexReader.IOne2OneIndex`

#### getNext

    public int[] getNext(int index,
                         int length)

Delegate to the int index.

Specified by:
  `getNext` in interface `IIndexReader.IOne2OneIndex`

#### close

    public void close()
               throws IOException

Delegate to the int index.

Specified by:
  `close` in interface `IIndexReader`
Throws:
  `IOException`

#### delete

    public void delete()

Delegate to the int index.

Specified by:
  `delete` in interface `IIndexReader`

#### size

    public int size()

Delegate to the int index.

Specified by:
  `size` in interface `IIndexReader`
Returns:
  number of entries

#### unload

    public void unload()
                throws IOException

Delegate to the int index.

Specified by:
  `unload` in interface `IIndexReader`
Throws:
  `IOException`