public int read() throws IOException {
  if (chunkLength <= 0) {
    readToData(false);
    if (chunkLength <= 0)     return -1;
  }
  chunkLength--;
  return is.read();
}

public int read ( ) throws IOException { if ( chunkLength <= 0 ) { readToData ( false ) ; if ( chunkLength <= 0 ) return - 1 ; } chunkLength -- ; return is . read ( ) ; }
writes a data byte to the output stream .
