public class PackBitmapIndexWriterV1
extends java.lang.Object
PackBitmapIndexV1
Modifier and Type | Field and Description |
---|---|
private java.io.DataOutput |
dataOutput |
private java.security.DigestOutputStream |
out |
Constructor and Description |
---|
PackBitmapIndexWriterV1(java.io.OutputStream dst)
Creates the version 1 pack bitmap index files.
|
Modifier and Type | Method and Description |
---|---|
void |
write(PackBitmapIndexBuilder bitmaps,
byte[] packDataChecksum)
Write all object entries to the index stream.
|
private void |
writeBitmap(com.googlecode.javaewah.EWAHCompressedBitmap bitmap) |
private void |
writeBitmapEntry(PackBitmapIndexBuilder.StoredEntry entry) |
private void |
writeBitmaps(PackBitmapIndexBuilder bitmaps) |
private void |
writeBody(PackBitmapIndexBuilder bitmaps) |
private void |
writeFooter() |
private void |
writeHeader(int options,
int bitmapCount,
byte[] packDataChecksum) |
private final java.security.DigestOutputStream out
private final java.io.DataOutput dataOutput
public PackBitmapIndexWriterV1(java.io.OutputStream dst)
dst
- the output stream to which the index will be written.public void write(PackBitmapIndexBuilder bitmaps, byte[] packDataChecksum) throws java.io.IOException
After writing the stream passed to the factory is flushed but remains open. Callers are always responsible for closing the output stream.
bitmaps
- the index data for the bitmapspackDataChecksum
- checksum signature of the entire pack data content. This is
traditionally the last 20 bytes of the pack file's own stream.java.io.IOException
- an error occurred while writing to the output stream, or this
index format cannot store the object data supplied.private void writeHeader(int options, int bitmapCount, byte[] packDataChecksum) throws java.io.IOException
java.io.IOException
private void writeBody(PackBitmapIndexBuilder bitmaps) throws java.io.IOException
java.io.IOException
private void writeBitmap(com.googlecode.javaewah.EWAHCompressedBitmap bitmap) throws java.io.IOException
java.io.IOException
private void writeBitmaps(PackBitmapIndexBuilder bitmaps) throws java.io.IOException
java.io.IOException
private void writeBitmapEntry(PackBitmapIndexBuilder.StoredEntry entry) throws java.io.IOException
java.io.IOException
private void writeFooter() throws java.io.IOException
java.io.IOException