Class java.io.OutputStream
All Packages This Package Previous Next
Class java.io.OutputStream
java.lang.Object
|
+----java.io.OutputStream
-
public class
OutputStream
-
extends Object
Abstract class representing an output stream of bytes.
All OutputStreams are based on this class.
-
See Also:
-
InputStream,
FilterOutputStream,
BufferedOutputStream,
DataOutputStream,
OutputStreamBuffer
-
Version:
-
1.7, 31 Jan 1995
-
Author:
-
Arthur van Hoff
-
OutputStream()
-
-
close()
-
Closes the stream.
-
flush()
-
Flushes the stream.
-
write(int)
-
Writes a byte.
-
write(byte[])
-
Writes an array of bytes.
-
write(byte[], int, int)
-
Writes a sub array of bytes.
OutputStream
public OutputStream()
write
public abstract void write(int b)
-
Writes a byte. Will block until the byte is actually
written.
-
Parameters:
-
b
-
the byte
-
Throws: IOException
-
i/o error occurred
write
public void write(byte b[])
-
Writes an array of bytes. Will block until the bytes
are actually written.
-
Parameters:
-
b
-
the data to be written
-
Throws: IOException
-
i/o error occurred
write
public void write(byte b[],
int off,
int len)
-
Writes a sub array of bytes. To be efficient it should
be overridden in a subclass.
-
Parameters:
-
b
-
the data to be written
-
off
-
the start offset in the data
-
len
-
the number of bytes that are written
-
Throws: IOException
-
i/o error occurred
flush
public void flush()
-
Flushes the stream. This will write any buffered
output bytes.
-
Throws: IOException
-
i/o error occurred
close
public void close()
-
Closes the stream. This method must be called
to release any resources associated with the
stream.
-
Throws: IOException
-
i/o error occurred
All Packages This Package Previous Next