Package org.apache.iceberg.io
Class PositionOutputStream
java.lang.Object
java.io.OutputStream
org.apache.iceberg.io.PositionOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Direct Known Subclasses:
AesGcmOutputStream
,OSSOutputStream
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract long
getPos()
Return the current position in the OutputStream.long
Return the current stored length of the output.Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write, write, write
-
Constructor Details
-
PositionOutputStream
public PositionOutputStream()
-
-
Method Details
-
getPos
Return the current position in the OutputStream.- Returns:
- current position in bytes from the start of the stream
- Throws:
IOException
- If the underlying stream throws IOException
-
storedLength
Return 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:
IOException
- If the underlying stream throws IOException
-