THE PACKAGE JAVA.IO
java.io.DataInput
22.1
22.1.11
public long readLong() throws IOException
The general contract of
readLong
 is that it reads eight input bytes and returns a
long
 value. Let
a
 be the first byte read,
b
 be the second byte,
c
 be the third byte,
d
be the fourth byte,
e
 be the fifth byte,
f
 be the sixth byte,
g
 be the seventh byte,
and
h
 be the eighth byte. The value returned is:
(((long)(a & 0xff) << 56) |
((long)(b & 0xff) << 48) |
((long)(c & 0xff) << 40) |
((long)(d & 0xff) << 32) |
((long)(e & 0xff) << 24) |
((long)(f & 0xff) << 16) |
((long)(g & 0xff) <<
8) |
((long)(h & 0xff)))
This method is suitable for reading bytes written by the
writeLong
 method of
interface
DataOutput
 ( 22.2.9).
22.1.12
public float readFloat() throws IOException
The general contract of
readFloat
 is that it reads four input bytes and returns a
float
 value. It does this by first constructing an
int
 value in exactly the manner
of the
readInt
 method ( 22.1.10), then converting this
int
 value to a
float
 in
exactly the manner of the method
Float.intBitsToFloat
 ( 20.9.23).
This method is suitable for reading bytes written by the
writeFloat
 method
of interface
DataOutput
 ( 22.2.10).
22.1.13
public double readDouble() throws IOException
The general contract of
readDouble
 is that it reads eight input bytes and returns a
double
 value. It does this by first constructing a
long
 value in exactly the manner
of the
readlong
 method ( 22.1.11), then converting this
long
 value to a
double
in exactly the manner of the method
Double.longBitsToDouble
 ( 20.10.22).
This method is suitable for reading bytes written by the
writeDouble
 method
of interface
DataOutput
 ( 22.2.11).
671






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