public class SivaReader
extends java.lang.Object
SivaReader and all its outputs are thread safe. This class handles the
unpacked process of a siva file.| Constructor and Description |
|---|
SivaReader(java.io.File sivaFile)
Create a
SivaReader from a siva file. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close closes the siva reader.
|
java.io.InputStream |
getEntry(IndexEntry indexEntry)
getEntry returns the file referenced by the provided
IndexEntry. |
IndexReader |
getIndex()
getIndex provides an
IndexReader that points to the index into
the siva file. |
public SivaReader(java.io.File sivaFile)
throws java.io.FileNotFoundException
SivaReader from a siva file.sivaFile - The siva file.java.io.FileNotFoundException - If the file does not exists.public final java.io.InputStream getEntry(IndexEntry indexEntry) throws SivaException
IndexEntry.
Entries can be obtained from getIndex() method.indexEntry - entry obtained from the siva indexSivaException - If some problem happens trying to read the siva file.public final IndexReader getIndex()
IndexReader that points to the index into
the siva file.
Is recommended to get an index per thread, but anyways
IndexReader is thread safe.IndexReaderpublic final void close()
throws SivaException
SivaException - if some error happens when we tried to close the
internal channel or the siva file reader.