API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.io. DataOutputStream View Source
Author(s)
unascribed
Since
JDK1.0
Version
1.44, 11/17/05
Serial
Hierarchy
 Object
      OutputStream
          FilterOutputStream
              DataOutputStream
Implements
 DataOutput
Subclasses
Description
public class DataOutputStream
  A data output stream lets an application write primitive Java data types to an output stream in a portable way.
See also:    DataInputStream
Constructors
public DataOutputStream (OutputStream out)
  Creates a new data output stream to write data to the specified underlying output stream.
Methods
Hide/Show inherited methods
public void close () throws IOException [Inherited From FilterOutputStream]
  Closes this output stream and releases any system resources associated with the stream.
public void flush () throws IOException [Overrides FilterOutputStream]
  Flushes this data output stream.
publicfinal int size ()
  Returns the current value of the counter written, the number of bytes written to this data output stream so far.
public void write (byte[] b) throws IOException [Inherited From FilterOutputStream]
  Writes b.length bytes to this output stream.
publicsynchronized void write (byte[] b, int off, int len) throws IOException [Overrides FilterOutputStream] [Specified in DataOutput]
  Writes len bytes from the specified byte array starting at offset off to the underlying output stream.
publicsynchronized void write (int b) throws IOException [Overrides FilterOutputStream] [Specified in DataOutput]
  Writes the specified byte (the low eight bits of the argument b) to the underlying output stream.
publicfinal void writeBoolean (boolean v) throws IOException [Specified in DataOutput]
  Writes a boolean to the underlying output stream as a 1-byte value.
publicfinal void writeByte (int v) throws IOException [Specified in DataOutput]
  Writes out a byte to the underlying output stream as a 1-byte value.
publicfinal void writeBytes (String s) throws IOException [Specified in DataOutput]
  Writes out the string to the underlying output stream as a sequence of bytes.
publicfinal void writeChar (int v) throws IOException [Specified in DataOutput]
  Writes a char to the underlying output stream as a 2-byte value, high byte first.
publicfinal void writeChars (String s) throws IOException [Specified in DataOutput]
  Writes a string to the underlying output stream as a sequence of characters.
publicfinal void writeDouble (double v) throws IOException [Specified in DataOutput]
  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.
publicfinal void writeFloat (float v) throws IOException [Specified in DataOutput]
  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.
publicfinal void writeInt (int v) throws IOException [Specified in DataOutput]
  Writes an int to the underlying output stream as four bytes, high byte first.
publicfinal void writeLong (long v) throws IOException [Specified in DataOutput]
  Writes a long to the underlying output stream as eight bytes, high byte first.
publicfinal void writeShort (int v) throws IOException [Specified in DataOutput]
  Writes a short to the underlying output stream as two bytes, high byte first.
publicfinal void writeUTF (String str) throws IOException [Specified in DataOutput]
  Writes a string to the underlying output stream using modified UTF-8 encoding in a machine-independent manner.
pack-privatestatic int writeUTF (String str, DataOutput out) throws IOException
  Writes a string to the specified DataOutput using modified UTF-8 encoding in a machine-independent manner.
Fields
Hide/Show inherited fields
protected OutputStream out [Inherited From FilterOutputStream]
The underlying output stream to be filtered.
protected int written
  The number of bytes written to the data output stream so far.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar