1 |
/* SocketInputStream.java -- An InputStream for Sockets |
/* SocketInputStream.java -- An InputStream for Sockets |
2 |
Copyright (C) 1998,2000 Free Software Foundation, Inc. |
Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
160 |
int bytes_read = read(buf, 0, buf.length); |
int bytes_read = read(buf, 0, buf.length); |
161 |
|
|
162 |
if (bytes_read != -1) |
if (bytes_read != -1) |
163 |
return((int)buf[0]); |
return(buf[0] & 0xFF); |
164 |
else |
else |
165 |
return(-1); |
return(-1); |
166 |
} |
} |