Package org.eclipse.mat.parser.index
Class IndexWriter.LongIndexStreamer
java.lang.Object
org.eclipse.mat.parser.index.IndexWriter.LongIndexStreamer
- Enclosing class:
 - IndexWriter
 
A helper class to output a list of longs.
- 
Constructor Summary
ConstructorsConstructorDescriptionA simple constructor.LongIndexStreamer(File indexFile) Construct a streamer which outputs to a file - 
Method Summary
Modifier and TypeMethodDescriptionvoidadd(long value) voidaddAll(long[] values) voidaddAll(long[] values, int offset, int length) voidvoidaddAll(IteratorLong iterator) voidclose()Close the backing file.longget(int index) long[]getNext(int index, int length) iterator()intreverse(long value) voidset(int index, long value) intsize()voidunload()writeTo(File indexFile, int size, HashMapIntObject<Object> pages, int pageSize) Output a whole long arrayOutput a whole ArrayLongwriteTo(File indexFile, IteratorLong iterator) Output a whole long iterator 
- 
Constructor Details
- 
LongIndexStreamer
public LongIndexStreamer()A simple constructor. - 
LongIndexStreamer
Construct a streamer which outputs to a file- Parameters:
 indexFile- the output file- Throws:
 IOException- if a problem occurs with a write
 
 - 
 - 
Method Details
- 
close
Close the backing file.- Throws:
 IOException- if a problem occurs with the write or close.
 - 
writeTo
public IIndexReader.IOne2LongIndex writeTo(File indexFile, int size, HashMapIntObject<Object> pages, int pageSize) throws IOException - Throws:
 IOException
 - 
writeTo
Output a whole long array- Parameters:
 indexFile- the output filearray- the source data- Returns:
 - a reader for the data
 - Throws:
 IOException- if a problem occurred with the write
 - 
writeTo
public IIndexReader.IOne2LongIndex writeTo(File indexFile, IteratorLong iterator) throws IOException Output a whole long iterator- Parameters:
 indexFile- the output fileiterator- the source data- Returns:
 - a reader for the data
 - Throws:
 IOException- if a problem occurred with the write
 - 
writeTo
Output a whole ArrayLong- Parameters:
 indexFile- the output filearray- the source data- Returns:
 - a reader for the data
 - Throws:
 IOException- if a problem occurred with the write
 - 
addAll
- Throws:
 IOException
 - 
addAll
- Throws:
 IOException
 - 
add
- Throws:
 IOException
 - 
addAll
- Throws:
 IOException
 - 
addAll
- Throws:
 IOException
 - 
get
public long get(int index)  - 
getNext
public long[] getNext(int index, int length)  - 
reverse
public int reverse(long value)  - 
set
public void set(int index, long value)  - 
unload
public void unload() - 
size
public int size() - 
iterator
 
 -