71 |
*/ |
*/ |
72 |
protected int len; |
protected int len; |
73 |
|
|
74 |
/* |
// We just use this if we are decoding one byte at a time with the |
75 |
* We just use this if we are decoding one byte at a time with the read() call |
// read() call. |
|
*/ |
|
76 |
private byte[] onebytebuffer = new byte[1]; |
private byte[] onebytebuffer = new byte[1]; |
77 |
|
|
78 |
/** |
/** |
167 |
*/ |
*/ |
168 |
public int read() throws IOException |
public int read() throws IOException |
169 |
{ |
{ |
170 |
int nread = read(onebytebuffer, 0, 1); //read one byte |
int nread = read(onebytebuffer, 0, 1); |
|
|
|
171 |
if (nread > 0) |
if (nread > 0) |
172 |
return onebytebuffer[0] & 0xff; |
return onebytebuffer[0] & 0xff; |
|
|
|
173 |
return -1; |
return -1; |
174 |
} |
} |
175 |
|
|