Package org.apache.lucene.misc.store
Class ByteTrackingIndexOutput
- java.lang.Object
-
- org.apache.lucene.store.DataOutput
-
- org.apache.lucene.store.IndexOutput
-
- org.apache.lucene.misc.store.ByteTrackingIndexOutput
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ByteTrackingIndexOutput extends IndexOutput
AnIndexOutputthat wraps another instance and tracks the number of bytes written
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedByteTrackingIndexOutput(IndexOutput output, AtomicLong byteTracker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()longgetChecksum()longgetFilePointer()StringgetWrappedName()StringgetWrappedToString()voidwriteByte(byte b)voidwriteBytes(byte[] b, int offset, int length)voidwriteInt(int i)voidwriteLong(long i)voidwriteShort(short i)-
Methods inherited from class org.apache.lucene.store.IndexOutput
alignFilePointer, alignOffset, getName, toString
-
Methods inherited from class org.apache.lucene.store.DataOutput
copyBytes, writeBytes, writeMapOfStrings, writeSetOfStrings, writeString, writeVInt, writeVLong, writeZInt, writeZLong
-
-
-
-
Constructor Detail
-
ByteTrackingIndexOutput
protected ByteTrackingIndexOutput(IndexOutput output, AtomicLong byteTracker)
-
-
Method Detail
-
writeByte
public void writeByte(byte b) throws IOException- Specified by:
writeBytein classDataOutput- Throws:
IOException
-
writeBytes
public void writeBytes(byte[] b, int offset, int length) throws IOException- Specified by:
writeBytesin classDataOutput- Throws:
IOException
-
writeShort
public void writeShort(short i) throws IOException- Overrides:
writeShortin classDataOutput- Throws:
IOException
-
writeInt
public void writeInt(int i) throws IOException- Overrides:
writeIntin classDataOutput- Throws:
IOException
-
writeLong
public void writeLong(long i) throws IOException- Overrides:
writeLongin classDataOutput- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classIndexOutput- Throws:
IOException
-
getFilePointer
public long getFilePointer()
- Specified by:
getFilePointerin classIndexOutput
-
getChecksum
public long getChecksum() throws IOException- Specified by:
getChecksumin classIndexOutput- Throws:
IOException
-
getWrappedName
public String getWrappedName()
-
getWrappedToString
public String getWrappedToString()
-
-