DataOutputStream Members

DataOutputStream Members

Class Overview | This Package | All Packages

Fields
Name Description
written The number of bytes written to the data output stream.

Constructors
Name Description
DataOutputStream(OutputStream) Creates a new data output stream to write data to the specified underlying output stream.

Methods
Name Description
flush() Flushes this data output stream.
size() Returns the number of bytes written to this data output stream.
write(byte[], int, int) Writes len bytes from the specified byte array starting at offset off to the underlying output stream.
write(int) Writes the specified byte to the underlying output stream.
writeBoolean(boolean) Writes a boolean to the underlying output stream as a 1-byte value.
writeByte(int) Writes out a byte to the underlying output stream as a 1-byte value.
writeBytes(String) Writes out the string to the underlying output stream as a sequence of bytes.
writeChar(int) Writes a char to the underlying output stream as a 2-byte value, high byte first.
writeChars(String) Writes a string to the underlying output stream as a sequence of characters.
writeDouble(double) Converts the double argument to a long using the doubleToLongBits method in class Double, and then writes that long value to the underlying output stream as an 8-byte quantity, high byte first.
writeFloat(float) Converts the float argument to an int using the floatToIntBits method in class Float, and then writes that int value to the underlying output stream as a 4-byte quantity, high byte first.
writeInt(int) Writes an int to the underlying output stream as four bytes, high byte first.
writeLong(long) Writes a long to the underlying output stream as eight bytes, high byte first.
writeShort(int) Writes a short to the underlying output stream as two bytes, high byte first.
writeUTF(String) Writes a string to the underlying output stream using UTF-8 encoding in a machine-independent manner.