Re: DataInputStream
Please do not top-post. Please trim your posts. Please do not quote
sigs. Please attribute your quotes.
moongeegee wrote:
I know that "DetaInputStream buf", the buf dose not contains anything,
thus it return -21.
I don't understand why it returns -21, why not other number.
Thanks
Would anyone please help me to understand why the return value ret is
-21 (a negative number 21)
Public static void (DataInputStream buf) {
This line will not compile. I notice that you pass a DataInputStream
to the method then wrap a DataInputStream around it. How is the
DataInputStream argument created?
DataInputStream dis = new DataInputStream(=
buf);
int ret = dis.available(); <=== =
here, the return value
RGB wrote:
The cause may be one of ...
A) You are doing something wrong in the code you are hiding from us.
B) It's only an estimate and estimates can be wrong.
C) There's a bug in some code you are using.
I am unable to reproduce your result:
....
Perhaps you can post an SSCCE (http://sscce.org) that demonstrates your
problem?
--
Lew