Interface java.io.DataOutput
All Packages Class Hierarchy This Package Previous Next Index
Interface java.io.DataOutput
- public interface DataOutput
- extends Object
DataOutput is an interface describing streams that can write output in a machine-independent format. - See Also:
- DataOutputStream, DataInput
- write(byte[])
- Writes an array of bytes.
- write(byte[], int, int)
- Writes a subarray of bytes.
- write(int)
- Writes a byte.
- writeBoolean(boolean)
- Writes a boolean.
- writeByte(int)
- Writes an 8 bit byte.
- writeBytes(String)
- Writes a String as a sequence of bytes.
- writeChar(int)
- Writes a 16 bit char.
- writeChars(String)
- Writes a String as a sequence of chars.
- writeDouble(double)
- Writes a 64 bit double.
- writeFloat(float)
- Writes a 32 bit float.
- writeInt(int)
- Writes a 32 bit int.
- writeLong(long)
- Writes a 64 bit long.
- writeShort(int)
- Writes a 16 bit short.
- writeUTF(String)
- Writes a String in UTF format.
write
public abstract void write(int b) throws IOException
- Writes a byte. Will block until the byte is actually
written.
- Parameters:
- b - the byte to be written
- Throws: IOException
- If an I/O error has occurred.
write
public abstract void write(byte b[]) throws IOException
- Writes an array of bytes.
- Parameters:
- b - the data to be written
- Throws: IOException
- If an I/O error has occurred.
write
public abstract void write(byte b[],
int off,
int len) throws IOException
- Writes a subarray of bytes.
- Parameters:
- b - the data to be written
- off - the start offset in the data
- len - the number of bytes that are written
- Throws: IOException
- If an I/O error has occurred.
writeBoolean
public abstract void writeBoolean(boolean v) throws IOException
- Writes a boolean.
- Parameters:
- v - the boolean to be written
writeByte
public abstract void writeByte(int v) throws IOException
- Writes an 8 bit byte.
- Parameters:
- v - the byte value to be written
writeShort
public abstract void writeShort(int v) throws IOException
- Writes a 16 bit short.
- Parameters:
- v - the short value to be written
writeChar
public abstract void writeChar(int v) throws IOException
- Writes a 16 bit char.
- Parameters:
- v - the char value to be written
writeInt
public abstract void writeInt(int v) throws IOException
- Writes a 32 bit int.
- Parameters:
- v - the integer value to be written
writeLong
public abstract void writeLong(long v) throws IOException
- Writes a 64 bit long.
- Parameters:
- v - the long value to be written
writeFloat
public abstract void writeFloat(float v) throws IOException
- Writes a 32 bit float.
- Parameters:
- v - the float value to be written
writeDouble
public abstract void writeDouble(double v) throws IOException
- Writes a 64 bit double.
- Parameters:
- v - the double value to be written
writeBytes
public abstract void writeBytes(String s) throws IOException
- Writes a String as a sequence of bytes.
- Parameters:
- s - the String of bytes to be written
writeChars
public abstract void writeChars(String s) throws IOException
- Writes a String as a sequence of chars.
- Parameters:
- s - the String of chars to be written
writeUTF
public abstract void writeUTF(String str) throws IOException
- Writes a String in UTF format.
- Parameters:
- str - the String in UTF format
All Packages Class Hierarchy This Package Previous Next Index