Package java.io Previous
Previous
Java API
Java API
Index
Index
Next
Next

Interface DataOutput

Methods

public  interface  java.io.DataOutput
{
        // Methods
    public abstract void write(byte  b[]);	
    public abstract void write(byte  b[], int  off, int  len)	
    public abstract void write(int  b);	
    public abstract void writeBoolean(boolean  v);	
    public abstract void writeByte(int  v);	
    public abstract void writeBytes(String  s);	
    public abstract void writeChar(int  v);	
    public abstract void writeChars(String  s);	
    public abstract void writeDouble(double  v);	
    public abstract void writeFloat(float  v);	
    public abstract void writeInt(int  v);	
    public abstract void writeLong(long  v);	
    public abstract void writeShort(int  v);	
    public abstract void writeUTF(String  str);	
}

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: DataOutputStream DataInput .


Methods


write

public abstract void write(byte  b[]) 
throws IOException 

Writes b.length bytes from the specified byte array to this output stream.

ParameterDescription
b the data

Throw:

IOException

If an I/O error occurs.


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.

ParameterDescription
b the data
off the start offset in the data
len the number of bytes to write

Throw:

IOException

If an I/O error occurs.


write

public abstract void write(int  b) 
throws IOException 

Writes the specified byte to this data output stream.

ParameterDescription
b the byte to be written

Throw:

IOException

If an I/O error occurs.


writeBoolean

public abstract void writeBoolean(boolean  v) 
throws IOException 

Writes a boolean value to this output stream.

ParameterDescription
v the boolean to be written

Throw:

IOException

If an I/O error occurs.


writeByte

public abstract void writeByte(int  v) 
throws IOException 

Writes an 8-bit value to this output stream.

ParameterDescription
v the byte value to be written

Throw:

IOException

If an I/O error occurs.


writeBytes

public abstract void writeBytes(String  s) 
throws IOException 

Writes out the string to this output stream as a sequence of bytes.

ParameterDescription
s the string of bytes to be written

Throw:

IOException

If an I/O error occurs.


writeChar

public abstract void writeChar(int  v) 
throws IOException 

Writes a char value to this output stream.

ParameterDescription
v the char value to be written

Throw:

IOException

If an I/O error occurs.


writeChars

public abstract void writeChars(String  s) 
throws IOException 

Writes a string to this output stream as a sequence of characters.

ParameterDescription
s the string value to be written

Throw:

IOException

If an I/O error occurs.


writeDouble

public abstract void writeDouble(double  v) 
throws IOException 

Writes a double value to this output stream.

ParameterDescription
v the double value to be written

Throw:

IOException

If an I/O error occurs.


writeFloat

public abstract void writeFloat(float  v) 
throws IOException 

Writes a float value to this output stream.

ParameterDescription
v the float value to be written

Throw:

IOException

If an I/O error occurs.


writeInt

public abstract void writeInt(int  v) 
throws IOException 

Writes an int value to this output stream.

ParameterDescription
v the int value to be written

Throw:

IOException

If an I/O error occurs.


writeLong

public abstract void writeLong(long  v) 
throws IOException 

Writes a long value to this output stream.

ParameterDescription
v the long value to be written

Throw:

IOException

If an I/O error occurs.


writeShort

public abstract void writeShort(int  v) 
throws IOException 

Writes a 16-bit value to this output stream.

ParameterDescription
v the short value to be written

Throw:

IOException

If an I/O error occurs.


writeUTF

public abstract void writeUTF(String  str) 
throws IOException 

Writes out a Unicode string that by encoded it using modified UTF-8 format.

ParameterDescription
str the string value to be written

Throw:

IOException

If an I/O error occurs.



Top© 1996 Sun Microsystems, Inc. All rights reserved.