Package org.eclipse.mat.parser.index
Class IndexWriter.IntIndexStreamer
java.lang.Object
org.eclipse.mat.parser.index.IndexWriter.IntIndexStreamer
- Enclosing class:
- IndexWriter
A helper to write out an index to a file.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
get
(int index) int[]
getAll
(int[] index) int[]
getNext
(int index, int length) iterator()
void
set
(int index, int value) int
size()
void
unload()
writeTo
(DataOutputStream out, long position, int[] array) Write out a page at a particular position.writeTo
(DataOutputStream out, long position, IteratorInt iterator) Write out a page at a particular position.Write an array to a file and return an index reader.writeTo
(File indexFile, IteratorInt iterator)
-
Constructor Details
-
IntIndexStreamer
public IntIndexStreamer()
-
-
Method Details
-
writeTo
- Throws:
IOException
-
writeTo
Write an array to a file and return an index reader.- Parameters:
indexFile
- the filearray
- the array to write out- Returns:
- the index reader
- Throws:
IOException
- if a problem occurs with the write
-
writeTo
public IIndexReader.IOne2OneIndex writeTo(DataOutputStream out, long position, IteratorInt iterator) throws IOException Write out a page at a particular position.- Parameters:
out
- the output streamposition
- the position of the dataiterator
- where the data comes from- Returns:
- a reader for the data written so far
- Throws:
IOException
- if the is a problem with the write
-
writeTo
public IIndexReader.IOne2OneIndex writeTo(DataOutputStream out, long position, int[] array) throws IOException Write out a page at a particular position.- Parameters:
out
- the output streamposition
- the position of the dataarray
- where the data comes from- Returns:
- a reader for the data written so far
- Throws:
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
-