Interface java.io.DataOutput
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.
- Version:
- 1.7, 07/01/98
- Author:
- Frank Yellin
- Since:
- JDK1.0
- See Also:
- DataInput, DataOutputStream
-
write(int)
- Writes the specified byte to this data output stream.
-
write(byte[])
- Writes
b.length
bytes from the specified byte array
to this output stream.
-
write(byte[], int, int)
- Writes
len
bytes from the specified byte array
starting at offset off
to this output stream.
-
writeBoolean(boolean)
- Writes a
boolean
value to this output stream.
-
writeByte(int)
- Writes an 8-bit value to this output stream.
-
writeBytes(String)
- Writes a string to this output stream.
-
writeChar(int)
- Writes a
char
value to this output stream.
-
writeChars(String)
- Writes a string to this output stream.
-
writeDouble(double)
- Writes a
double
value to this output stream.
-
writeFloat(float)
- Writes a
float
value to this output stream.
-
writeInt(int)
- Writes an
int
value to this output stream.
-
writeLong(long)
- Writes a
long
value to this output stream.
-
writeShort(int)
- Writes a 16-bit value to this output stream.
-
writeUTF(String)
- Writes a Unicode string by encoding it using modified UTF-8 format.
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.
- Since:
- JDK1.0
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.
- Since:
- JDK1.0
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.
- Since:
- JDK1.0
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.
- Since:
- JDK1.0
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.
- Since:
- JDK1.0
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.
- Since:
- JDK1.0
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.
- Since:
- JDK1.0
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.
- Since:
- JDK1.0
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.
- Since:
- JDK1.0
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.
- Since:
- JDK1.0
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.
- Since:
- JDK1.0
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.
- Since:
- JDK1.0
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.
- Since:
- JDK1.0
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.
- Since:
- JDK1.0
All Packages Class Hierarchy This Package Previous Next Index