All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface java.io.DataOutput

public interface DataOutput
The data output interface is implemented by streams that can write primitive Java data types to an output stream in a machine-independent manner.

See Also:
DataInput, DataOutputStream

Method Index

 o write(byte[])
Writes b.length bytes from the specified byte array to this output stream.
 o write(byte[], int, int)
Writes len bytes from the specified byte array starting at offset off to this output stream.
 o write(int)
Writes the specified byte to this data output stream.
 o writeBoolean(boolean)
Writes a boolean value to this output stream.
 o writeByte(int)
Writes an 8-bit value to this output stream.
 o writeBytes(String)
Writes a string to this output stream.
 o writeChar(int)
Writes a char value to this output stream.
 o writeChars(String)
Writes a string to this output stream.
 o writeDouble(double)
Writes a double value to this output stream.
 o writeFloat(float)
Writes a float value to this output stream.
 o writeInt(int)
Writes an int value to this output stream.
 o writeLong(long)
Writes a long value to this output stream.
 o writeShort(int)
Writes a 16-bit value to this output stream.
 o writeUTF(String)
Writes a Unicode string by encoding it using modified UTF-8 format.

Methods

 o write
 public abstract void write(int b) throws IOException
Writes the specified byte to this data output stream.

Parameters:
b - the byte to be written.
Throws: IOException
if an I/O error occurs.
 o write
 public abstract void write(byte b[]) throws IOException
Writes b.length bytes from the specified byte array to this output stream.

Parameters:
b - the data.
Throws: IOException
if an I/O error occurs.
 o write
 public abstract void write(byte b[],
                            int off,
                            int len) throws IOException
Writes len bytes from the specified byte array starting at offset off to this output stream.

Parameters:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
Throws: IOException
if an I/O error occurs.
 o writeBoolean
 public abstract void writeBoolean(boolean v) throws IOException
Writes a boolean value to this output stream.

Parameters:
v - the boolean to be written.
Throws: IOException
if an I/O error occurs.
 o writeByte
 public abstract void writeByte(int v) throws IOException
Writes an 8-bit value to this output stream.

Parameters:
v - the byte value to be written.
Throws: IOException
if an I/O error occurs.
 o writeShort
 public abstract void writeShort(int v) throws IOException
Writes a 16-bit value to this output stream.

Parameters:
v - the short value to be written.
Throws: IOException
if an I/O error occurs.
 o writeChar
 public abstract void writeChar(int v) throws IOException
Writes a char value to this output stream.

Parameters:
v - the char value to be written.
Throws: IOException
if an I/O error occurs.
 o writeInt
 public abstract void writeInt(int v) throws IOException
Writes an int value to this output stream.

Parameters:
v - the int value to be written.
Throws: IOException
if an I/O error occurs.
 o writeLong
 public abstract void writeLong(long v) throws IOException
Writes a long value to this output stream.

Parameters:
v - the long value to be written.
Throws: IOException
if an I/O error occurs.
 o writeFloat
 public abstract void writeFloat(float v) throws IOException
Writes a float value to this output stream.

Parameters:
v - the float value to be written.
Throws: IOException
if an I/O error occurs.
 o writeDouble
 public abstract void writeDouble(double v) throws IOException
Writes a double value to this output stream.

Parameters:
v - the double value to be written.
Throws: IOException
if an I/O error occurs.
 o writeBytes
 public abstract void writeBytes(String s) throws IOException
Writes a string to this output stream.

Parameters:
s - the string of bytes to be written.
Throws: IOException
if an I/O error occurs.
 o writeChars
 public abstract void writeChars(String s) throws IOException
Writes a string to this output stream.

Parameters:
s - the string value to be written.
Throws: IOException
if an I/O error occurs.
 o writeUTF
 public abstract void writeUTF(String str) throws IOException
Writes a Unicode string by encoding it using modified UTF-8 format.

Parameters:
str - the string value to be written.
Throws: IOException
if an I/O error occurs.

All Packages  Class Hierarchy  This Package  Previous  Next  Index

Submit a bug or feature