Package java.io

Interface DataOutput

All Known Subinterfaces:
ObjectOutput
All Known Implementing Classes:
DataOutputStream, ObjectOutputStream, RandomAccessFile

public interface DataOutput
Defines an interface for classes that are able to write big-endian typed data to some target. Typically, this data can be read in by a class which implements DataInput. Types that can be written include byte, 16-bit short, 32-bit int, 32-bit float, 64-bit long, 64-bit double, byte strings, and MUTF-8 encoded strings.
See Also:
DataOutputStream, RandomAccessFile
  • Method Summary

    Modifier and Type Method Description
    void write​(byte[] buffer)
    Writes the entire contents of the byte array buffer to this stream.
    void write​(byte[] buffer, int offset, int count)
    Writes count bytes from the byte array buffer starting at offset index.
    void write​(int oneByte)
    Writes the specified 8-bit byte.
    void writeBoolean​(boolean val)
    Writes the specified boolean.
    void writeByte​(int val)
    Writes the specified 8-bit byte.
    void writeBytes​(String str)
    Writes the low order 8-bit bytes from the specified string.
    void writeChar​(int val)
    Writes the specified 16-bit character in big-endian order.
    void writeChars​(String str)
    Writes the 16-bit characters contained in str in big-endian order.
    void writeDouble​(double val)
    Writes the specified 64-bit double in big-endian order.
    void writeFloat​(float val)
    Writes the specified 32-bit float in big-endian order.
    void writeInt​(int val)
    Writes the specified 32-bit int in big-endian order.
    void writeLong​(long val)
    Writes the specified 64-bit long in big-endian order.
    void writeShort​(int val)
    Writes the specified 16-bit short in big-endian order.
    void writeUTF​(String str)
    Writes the specified string encoded in modified UTF-8.