Package org.eclipse.mat.parser.index

## Class IndexWriter.IntIndexStreamer

- java.lang.Object
- - org.eclipse.mat.parser.index.IndexWriter.IntIndexStreamer

Enclosing class:
  IndexWriter

    public static class IndexWriter.IntIndexStreamer
    extends java.lang.Object

A helper to write out an index to a file.

### Constructor Summary

Constructors
`IntIndexStreamer()`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `get​(int index)`
`int[]` `getAll​(int[] index)`
`int[]` `getNext​(int index, int length)`
`IteratorInt` `iterator()`
`void` `set​(int index, int value)`
`int` `size()`
`void` `unload()`
`IIndexReader.IOne2OneIndex` `writeTo​(java.io.DataOutputStream out, long position, int[] array)` Write out a page at a particular position.
`IIndexReader.IOne2OneIndex` `writeTo​(java.io.DataOutputStream out, long position, IteratorInt iterator)` Write out a page at a particular position.
`IIndexReader.IOne2OneIndex` `writeTo​(java.io.File indexFile, int[] array)` Write an array to a file and return an index reader.
`IIndexReader.IOne2OneIndex` `writeTo​(java.io.File indexFile, IteratorInt iterator)`

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

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

### Constructor Detail

#### IntIndexStreamer

    public IntIndexStreamer()

### Method Detail

#### writeTo

    public IIndexReader.IOne2OneIndex writeTo​(java.io.File indexFile,
                                              IteratorInt iterator)
                                       throws java.io.IOException

Throws:
  `java.io.IOException`

#### writeTo

    public IIndexReader.IOne2OneIndex writeTo​(java.io.File indexFile,
                                              int[] array)
                                       throws java.io.IOException

Write an array to a file and return an index reader.

Parameters:
  `indexFile` - the file
  `array` - the array to write out
Returns:
  the index reader
Throws:
  `java.io.IOException` - if a problem occurs with the write

#### writeTo

    public IIndexReader.IOne2OneIndex writeTo​(java.io.DataOutputStream out,
                                              long position,
                                              IteratorInt iterator)
                                       throws java.io.IOException

Write out a page at a particular position.

Parameters:
  `out` - the output stream
  `position` - the position of the data
  `iterator` - where the data comes from
Returns:
  a reader for the data written so far
Throws:
  `java.io.IOException` - if the is a problem with the write

#### writeTo

    public IIndexReader.IOne2OneIndex writeTo​(java.io.DataOutputStream out,
                                              long position,
                                              int[] array)
                                       throws java.io.IOException

Write out a page at a particular position.

Parameters:
  `out` - the output stream
  `position` - the position of the data
  `array` - where the data comes from
Returns:
  a reader for the data written so far
Throws:
  `java.io.IOException` - if the is a problem with the write

#### get

    public int get​(int index)

#### getNext

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

#### getAll

    public int[] getAll​(int[] index)

#### set

    public void set​(int index,
                    int value)

#### unload

    public void unload()

#### size

    public int size()

#### iterator

    public IteratorInt iterator()