Class 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
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract long getPos()
      Return the current position in the OutputStream.
      long storedLength()
      Return the current stored length of the output.
      • Methods inherited from class java.io.OutputStream

        close, flush, nullOutputStream, write, write, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PositionOutputStream

        public PositionOutputStream()
    • Method Detail

      • getPos

        public abstract long getPos()
                             throws java.io.IOException
        Return 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.IOException
        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:
        java.io.IOException - If the underlying stream throws IOException