Class RandomAccessOutputStream

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract long position()
      Provides current position in output.
      void write​(int b)  
      (package private) abstract void writeFully​(byte[] b, int off, int len, long position)
      Writes given data to specific position.
      void writeFully​(byte[] b, long position)
      Writes given data to specific position.
      • Methods inherited from class java.io.OutputStream

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

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

      • RandomAccessOutputStream

        RandomAccessOutputStream()
    • Method Detail

      • position

        public abstract long position()
                               throws java.io.IOException
        Provides current position in output.
        Returns:
        current position.
        Throws:
        java.io.IOException - if an I/O error occurs
      • write

        public void write​(int b)
                   throws java.io.IOException
        Specified by:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException
      • writeFully

        abstract void writeFully​(byte[] b,
                                 int off,
                                 int len,
                                 long position)
                          throws java.io.IOException
        Writes given data to specific position.
        Parameters:
        position - position in the stream
        b - data to write
        off - offset of the start of data in param b
        len - the length of data to write
        Throws:
        java.io.IOException - if an I/O error occurs.
      • writeFully

        public void writeFully​(byte[] b,
                               long position)
                        throws java.io.IOException
        Writes given data to specific position.
        Parameters:
        position - position in the stream
        b - data to write
        Throws:
        java.io.IOException - if an I/O error occurs.