Interface ByteArrayDataOutput

  • All Superinterfaces:

    public interface ByteArrayDataOutput
    An extension of DataOutput for writing to in-memory byte arrays; its methods offer identical functionality but do not throw IOException.
    Jayaprabhakar Kadarkarai
    • Method Detail

      • write

        void write​(int b)
        Specified by:
        write in interface
      • write

        void write​(byte[] b)
        Specified by:
        write in interface
      • write

        void write​(byte[] b,
                   int off,
                   int len)
        Specified by:
        write in interface
      • writeBoolean

        void writeBoolean​(boolean v)
        Specified by:
        writeBoolean in interface
      • writeByte

        void writeByte​(int v)
        Specified by:
        writeByte in interface
      • writeShort

        void writeShort​(int v)
        Specified by:
        writeShort in interface
      • writeChar

        void writeChar​(int v)
        Specified by:
        writeChar in interface
      • writeInt

        void writeInt​(int v)
        Specified by:
        writeInt in interface
      • writeLong

        void writeLong​(long v)
        Specified by:
        writeLong in interface
      • writeFloat

        void writeFloat​(float v)
        Specified by:
        writeFloat in interface
      • writeDouble

        void writeDouble​(double v)
        Specified by:
        writeDouble in interface
      • writeChars

        void writeChars​(java.lang.String s)
        Specified by:
        writeChars in interface
      • writeUTF

        void writeUTF​(java.lang.String s)
        Specified by:
        writeUTF in interface
      • writeBytes

        void writeBytes​(java.lang.String s)
        This method is dangerous as it discards the high byte of every character. For UTF-8, use write(s.getBytes(StandardCharsets.UTF_8)).
        Specified by:
        writeBytes in interface
      • toByteArray

        byte[] toByteArray()
        Returns the contents that have been written to this instance, as a byte array.