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
AnIndexOutput
that wraps another instance and tracks the number of bytes written
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ByteTrackingIndexOutput(IndexOutput output, AtomicLong byteTracker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
long
getChecksum()
long
getFilePointer()
String
getWrappedName()
String
getWrappedToString()
void
writeByte(byte b)
void
writeBytes(byte[] b, int offset, int length)
void
writeInt(int i)
void
writeLong(long i)
void
writeShort(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:
writeByte
in classDataOutput
- Throws:
IOException
-
writeBytes
public void writeBytes(byte[] b, int offset, int length) throws IOException
- Specified by:
writeBytes
in classDataOutput
- Throws:
IOException
-
writeShort
public void writeShort(short i) throws IOException
- Overrides:
writeShort
in classDataOutput
- Throws:
IOException
-
writeInt
public void writeInt(int i) throws IOException
- Overrides:
writeInt
in classDataOutput
- Throws:
IOException
-
writeLong
public void writeLong(long i) throws IOException
- Overrides:
writeLong
in classDataOutput
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classIndexOutput
- Throws:
IOException
-
getFilePointer
public long getFilePointer()
- Specified by:
getFilePointer
in classIndexOutput
-
getChecksum
public long getChecksum() throws IOException
- Specified by:
getChecksum
in classIndexOutput
- Throws:
IOException
-
getWrappedName
public String getWrappedName()
-
getWrappedToString
public String getWrappedToString()
-
-