22.1
java.io.DataInput
THE PACKAGE JAVA.IO
22.1.1
public void readFully(byte[] b)
throws IOException, NullPointerException;
The general contract of
readFully(b)
 is that it reads some bytes from an input
stream and stores them into the buffer array
b
. The number of bytes read is equal
to the length of
b
.
This method blocks until one of the following conditions occurs:
b.length
 bytes of input data are available, in which case a normal return is
made.
End of file is detected, in which case an
EOFException
 is thrown.
An I/O error occurs, in which case an
IOException
 other than
EOFExcep 
tion
 is thrown.
If
b
 is
null
, a
NullPointerException
 is thrown.
If
b.length
 is zero, then no bytes are read. Otherwise, the first byte read is
stored into element
b[0]
, the next one into
b[1]
, and so on.
If an exception is thrown from this method, then it may be that some but not
all bytes of
b
 have been updated with data from the input stream.
22.1.2
public void readFully(byte[] b, int off, int len)
throws IOException, NullPointerException,
IndexOutOfBoundsException
The general contract of
readFully(b, off, len)
 is that it reads
len
 bytes from
an input stream.
This method blocks until one of the following conditions occurs:
len
 bytes of input data are available, in which case a normal return is made.
End of file is detected, in which case an
EOFException
 is thrown.
An I/O error occurs, in which case an
IOException
 other than
EOFExcep 
tion
 is thrown.
If
b
 is
null
, a
NullPointerException
 is thrown.
If
off
 is negative, or
len
 is negative, or
off+len
 is greater than the length of
the array
b
, then an
IndexOutOfBoundsException
 is thrown.
If
len
 is zero, then no bytes are read. Otherwise, the first byte read is stored
into element
b[off]
, the next one into
b[off+1]
, and so on. The number of bytes
read is, at most, equal to
len
.
668






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