← 返回首页
DataOutputStream (Java SE 26 & JDK 26)
JavaScript is disabled on your browser.
Contents  
  1. Description
  2. Field Summary
  3. Constructor Summary
  4. Method Summary
    1. Methods declared in class FilterOutputStream
    2. Methods declared in class OutputStream
    3. Methods declared in class Object
    4. Methods declared in interface DataOutput
  5. Field Details
    1. written
  6. Constructor Details
    1. DataOutputStream(OutputStream)
  7. Method Details
    1. write(int)
    2. write(byte[], int, int)
    3. flush()
    4. writeBoolean(boolean)
    5. writeByte(int)
    6. writeShort(int)
    7. writeChar(int)
    8. writeInt(int)
    9. writeLong(long)
    10. writeFloat(float)
    11. writeDouble(double)
    12. writeBytes(String)
    13. writeChars(String)
    14. writeUTF(String)
    15. size()
Hide sidebar  Show sidebar

Class DataOutputStream

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:

Scripting on this page tracks web page traffic, but does not change the content in any way.