Package org.apache.iceberg.io
Class PositionOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.apache.iceberg.io.PositionOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
- Direct Known Subclasses:
AesGcmOutputStream,OSSOutputStream
public abstract class PositionOutputStream extends java.io.OutputStream
-
-
Constructor Summary
Constructors Constructor Description PositionOutputStream()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract longgetPos()Return the current position in the OutputStream.longstoredLength()Return the current stored length of the output.
-
-
-
Method Detail
-
getPos
public abstract long getPos() throws java.io.IOExceptionReturn the current position in the OutputStream.- Returns:
- current position in bytes from the start of the stream
- Throws:
java.io.IOException- If the underlying stream throws IOException
-
storedLength
public long storedLength() throws java.io.IOExceptionReturn the current stored length of the output. Can differ from the current position for encrypting streams, and for other non-length-preserving streams.- Returns:
- current stored length in bytes
- Throws:
java.io.IOException- If the underlying stream throws IOException
-
-