[prev in list] [next in list] [prev in thread] [next in thread]
List: kvm-interest
Subject: Problem with read(byte[] b, int off, int len) in InputStream
From: Dong Zhou <zhou () CC ! GATECH ! EDU>
Date: 2000-06-30 15:47:18
[Download RAW message or body]
Hi,
I'm wondering if someone else had same problem as mine.
I'm using socket connection between POSE and Unix
workstations, and I use StreamConnection.openInputStream ()
to get the InputStream.
My program works when I solely use InputStream.read() to
receive data byte by byte but, as one would expect, it was
very slow. However, when I tried to use read(byte[] b, int off, int len)
to "spool-read" data, I always got an IOException with not
one byte of data ever returned... What am I doing wrong?
I never had such problem with J2SE, so I'm wondering why
J2ME is implemented differently?
Also, I looked at com.sun.cldc.io.j2me.socket.Protocol.java,
and it seemed that the read(byte b[], int off, int len)
method in PrivateInputStream ignores the possibility of
Protocol.read0(byte b[], int off, int len) returning -2
as result. Could it be a bug?
-Dong
==========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic