Name

java.io.DataOutputStream

Synopsis

This class is a slightly smaller version of the J2SE DataOutputStream class. The class can be used to write out primitive data types to a platform-dependent source. Most of the methods of this class write a Java primitive data type to a stream. The write() methods write out a single byte or a byte array (or portion thereof) to the output stream. flush() flushes out the I/O buffer, and close() closes the output stream.

public classDataOutputStream extends java.io.OutputStream
   implements java.io.DataOutput {
   // protected fields
   protected OutputStream out;

   // constructor
   public DataOutputStream(OutputStream out);

   // public instance methods
   public void close() throws java.io.IOException;
   public void flush() throws java.ioIOException;
   public void write(int b) throws java.io.IOException;
   public void write(byte[] b, int off, int len) throws java.io.IOException;
   public final void writeBoolean(boolean v) throws java.io.IOException;
   public final void writeByte(int v) throws java.io.IOException;
   public final void writeChar(int v) throws java.io.IOException;
   public final void writeChars(String s) throws java.io.IOException;
   public final void writeInt(int v) throws java.io.IOException;
   public final void writeLong(long v) throws java.io.IOException;
   public final void writeShort(int v) throws java.io.IOException;
   public final void writeUTF(String str) throws java.io.IOException; 
}

Get Wireless Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.