Interface ByteWriter

    • Field Summary

      • Fields inherited from interface com.adobe.internal.io.ByteReader

        EOF
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void flush()
      Flushes this ByteWriter and forces any unwritten buffered output bytes to be written out to the underlying repository.
      void write​(long position, byte[] b, int offset, int length)
      Write an array of bytes at the position given.
      void write​(long position, int b)
      Write the byte given at the position given.
    • Method Detail

      • write

        void write​(long position,
                   int b)
            throws java.io.IOException
        Write the byte given at the position given. If during the write operation the byte to be written is beyond the end of the virtual array visible through this interface then the length of that virtual array becomes the position of the byte written plus one (because of zero based counting). length of virtual array = max(length of virtual array, position of byte written + 1)
        Parameters:
        position - the zero-based offset within the byte array.
        b - the byte to write.
        Throws:
        java.io.IOException - if an error occurs during the write operation
      • write

        void write​(long position,
                   byte[] b,
                   int offset,
                   int length)
            throws java.io.IOException
        Write an array of bytes at the position given. If during the write operation any of the bytes are to be written beyond the end of the virtual array visible through this interface then the length of that virtual array becomes the position of the byte written plus one (because of zero based counting). for each byte written : length of virtual array = max(length of virtual array, position of byte written + 1)
        Parameters:
        position - the zero-based offset within the byte array.
        b - the array of bytes to write from.
        offset - the offset within the byte array to start writing from.
        length - the number of bytes to write from the byte array.
        Throws:
        java.io.IOException - if an error occurs during the write operation
      • flush

        void flush()
            throws java.io.IOException
        Flushes this ByteWriter and forces any unwritten buffered output bytes to be written out to the underlying repository.
        Throws:
        java.io.IOException - if an error occurs while trying to flush the buffer