Ejemplo n.º 1
0
 public int read(byte[] b, int st, int len) throws IOException {
   if (owner.chunkLength <= 0) if (!owner.getData()) return -1;
   if (owner.chunkLength < len) len = owner.chunkLength;
   System.arraycopy(owner.inbuf, owner.chunkStart, b, st, len);
   owner.chunkLength -= len;
   owner.chunkStart += len;
   return len;
 }
Ejemplo n.º 2
0
 public int read() throws IOException {
   if (owner.chunkLength <= 0) if (!owner.getData()) return -1;
   owner.chunkLength--;
   return owner.inbuf[owner.chunkStart++] & 0xFF;
 }