@Override public int read(byte[] buffer,int offset,int length) throws IOException {
  int sublen=_next.read(buffer,offset,length);
  if (sublen <= 0) {
    return 0;
  }
  _crc=Crc64.generate(_crc,buffer,offset,sublen);
  _length+=sublen;
  return sublen;
}

@ Override public int read ( byte [ ] buffer , int offset , int length ) throws IOException { int sublen = _next . read ( buffer , offset , length ) ; if ( sublen <= 0 ) { return 0 ; } _crc = Crc64 . generate ( _crc , buffer , offset , sublen ) ; _length += sublen ; return sublen ; }
writes a buffer to the underlying stream .
