Module java.base
Package java.io

Class DataOutputStream

java.lang.Object
All Implemented Interfaces:
Closeable, DataOutput, Flushable, AutoCloseable

public class DataOutputStream extends FilterOutputStream implements DataOutput
A data output stream lets an application write primitive Java data types to an output stream in a portable way. An application can then use a data input stream to read the data back in. A data output stream wraps another output stream and delegates writing bytes to the write methods of that output stream. Writing data consisting of more than a single byte may cause several writes to the underlying output stream.

A DataOutputStream is not safe for use by multiple concurrent threads. If a DataOutputStream is to be used by more than one thread then access to the data output stream should be controlled by appropriate synchronization.

Since:
1.0
See Also: