public class DataOutputStream extends FilterOutputStream
implements DataOutput

Wraps an existing OutputStream and writes big-endian typed data to it. Typically, this stream can be read in by DataInputStream. 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

Field Summary

protected int written The number of bytes written out so far.

Inherited Field Summary

Public Constructor Summary

DataOutputStream(OutputStream out)
Constructs a new DataOutputStream on the OutputStream out.

Public Method Summary

Flushes this stream to ensure all pending data is sent out to the target stream.
final int
Returns the total number of bytes written to the target stream so far.
write(byte[] buffer, int offset, int count)
Writes count bytes from the byte array buffer starting at offset to the target stream.
write(int oneByte)
Writes a byte to the target stream.
final void