| Package java.io |
Previous |
Java API |
Index |
Next |
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 . |
public abstract void write(byte b[])throws IOExceptionWrites b.length bytes from the specified byte array to this output stream.
Parameter Description b the data Throw:
If an I/O error occurs.
public abstract void write(byte b[], int off, int len)throws IOExceptionWrites len bytes from the specified byte array starting at offset off to this output stream.
Parameter Description b the data off the start offset in the data len the number of bytes to write Throw:
If an I/O error occurs.
public abstract void write(int b)throws IOExceptionWrites the specified byte to this data output stream.
Parameter Description b the byte to be written Throw:
If an I/O error occurs.
public abstract void writeBoolean(boolean v)throws IOExceptionWrites a boolean value to this output stream.
Parameter Description v the boolean to be written Throw:
If an I/O error occurs.
public abstract void writeByte(int v)throws IOExceptionWrites an 8-bit value to this output stream.
Parameter Description v the byte value to be written Throw:
If an I/O error occurs.
public abstract void writeBytes(String s)throws IOExceptionWrites out the string to this output stream as a sequence of bytes.
Parameter Description s the string of bytes to be written Throw:
If an I/O error occurs.
public abstract void writeChar(int v)throws IOExceptionWrites a char value to this output stream.
Parameter Description v the char value to be written Throw:
If an I/O error occurs.
public abstract void writeChars(String s)throws IOExceptionWrites a string to this output stream as a sequence of characters.
Parameter Description s the string value to be written Throw:
If an I/O error occurs.
public abstract void writeDouble(double v)throws IOExceptionWrites a double value to this output stream.
Parameter Description v the double value to be written Throw:
If an I/O error occurs.
public abstract void writeFloat(float v)throws IOExceptionWrites a float value to this output stream.
Parameter Description v the float value to be written Throw:
If an I/O error occurs.
public abstract void writeInt(int v)throws IOExceptionWrites an int value to this output stream.
Parameter Description v the int value to be written Throw:
If an I/O error occurs.
public abstract void writeLong(long v)throws IOExceptionWrites a long value to this output stream.
Parameter Description v the long value to be written Throw:
If an I/O error occurs.
public abstract void writeShort(int v)throws IOExceptionWrites a 16-bit value to this output stream.
Parameter Description v the short value to be written Throw:
If an I/O error occurs.
public abstract void writeUTF(String str)throws IOExceptionWrites out a Unicode string that by encoded it using modified UTF-8 format.
Parameter Description str the string value to be written Throw:
If an I/O error occurs.
| © 1996 Sun Microsystems, Inc. All rights reserved. |