public void writeToStream(OutputStream os,int len) throws IOException {
  while (len > 0) {
    if (_readLength <= _readOffset) {
      if (!readBuffer())       return;
    }
    int sublen=Math.min(len,_readLength - _readOffset);
    os.write(_readBuffer,_readOffset,sublen);
    _readOffset+=sublen;
    len-=sublen;
  }
}

public void writeToStream ( OutputStream os , int len ) throws IOException { while ( len > 0 ) { if ( _readLength <= _readOffset ) { if ( ! readBuffer ( ) ) return ; } int sublen = Math . min ( len , _readLength - _readOffset ) ; os . write ( _readBuffer , _readOffset , sublen ) ; _readOffset += sublen ; len -= sublen ; } }
writes < code > len < code > bytes to the output stream from this stream .
