Interface DirectDataOutput

  • All Known Subinterfaces:
    RandomAccessOutputStream, RevisionDataOutput
    All Known Implementing Classes:
    ByteBufferOutputStream

    public interface DirectDataOutput
    Defines an object meant for serializing data (usually an OutputStream) that can write various inputs more efficiently than otherwise (i.e., byte-by-byte copy).
    • Method Detail

      • writeBuffer

        void writeBuffer​(BufferView buffer)
                  throws java.io.IOException
        Includes the given BufferView.
        Parameters:
        buffer - The BufferView to include.
        Throws:
        java.io.IOException - If an IO Exception occurred.
      • writeShort

        void writeShort​(int shortValue)
                 throws java.io.IOException
        Writes the given value as a 16 bit Short. Every effort will be made to write this using efficient techniques (such as making use of intrinsic instructions).
        Parameters:
        shortValue - The Short value to write.
        Throws:
        java.io.IOException - If an IO Exception occurred.
      • writeInt

        void writeInt​(int intValue)
               throws java.io.IOException
        Writes the given value as a 32 bit Integer. Every effort will be made to write this using efficient techniques (such as making use of intrinsic instructions).
        Parameters:
        intValue - The Integer value to write.
        Throws:
        java.io.IOException - If an IO Exception occurred.
      • writeLong

        void writeLong​(long longValue)
                throws java.io.IOException
        Writes the given value as a 64 bit Long. Every effort will be made to write this using efficient techniques (such as making use of intrinsic instructions).
        Parameters:
        longValue - The Long value to write.
        Throws:
        java.io.IOException - If an IO Exception occurred.