int write(byte[] buff,int offset,int len){
  int max=Math.min(remaining,len);
  data.write(buff,offset,max);
  remaining-=max;
  return max;
}

int write ( byte [ ] buff , int offset , int len ) { int max = Math . min ( remaining , len ) ; data . write ( buff , offset , max ) ; remaining -= max ; return max ; }
write the data to the buffer .
