22.15
java.io.OutputStream
THE PACKAGE JAVA.IO
22.15 The Class
java.io.OutputStream
An output stream accepts output bytes and sends them to some sink.
public abstract class OutputStream {
public abstract void write(int b) throws IOException;
public void write(byte[] b)
throws IOException, NullPointerException;
public void write(byte[] b, int off, int len)
throws IOException, NullPointerException,
IndexOutOfBoundsException;
public void flush() throws IOException;
public void close() throws IOException;
}
22.15.1
public abstract void write(int b) throws IOException
The general contract for
write
 is that one byte is written to the output stream. The
byte to be written is the eight low order bits of the argument
b
. The 24 high order
bits of
b
 are ignored.
If the byte cannot be written for any reason, an
IOException
 is thrown. In
particular, an
IOException
 may be thrown if the output stream has been closed
( 22.15.5).
22.15.2
public void write(byte[] b)
throws IOException, NullPointerException
The general contract for
write(b)
 is that it should have exactly the same effect as
the call
write(b, 0, b.length)
 ( 22.15.3).
The
write(b)
 method for class
OutputStream
 in fact makes such a call.
22.15.3
public void write(byte[] b, int off, int len)
throws IOException, NullPointerException,
IndexOutOfBoundsException
The general contract for
write(b, off, len)
 is that some of the bytes in the
array
b
 are written to the output stream as if one at a time, in order; element
b[off]
 is the first byte written and
b[off+len 1]
 is the last byte written by this
operation.
If
b
 is
null
, a
NullPointerException
 is thrown.
720






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved