public void writeBytes(int position,int num,byte[] buf){
  if (buf.length < num) {
    throw new PageException("num bytes to write is longer than buffer");
  }
  if (position < 0 || num < 0) {
    throw new PageException("position or num can't be negative");
  }
  if (Page.pageSize < num + position) {
    throw new PageException("writeBytes would go out of bounds");
  }
  pageData.position(position);
  pageData.put(buf,0,num);
}

public void writeBytes ( int position , int num , byte [ ] buf ) { if ( buf . length < num ) { throw new PageException ( "num bytes to write is longer than buffer" ) ; } if ( position < 0 || num < 0 ) { throw new PageException ( "position or num can't be negative" ) ; } if ( Page . pageSize < num + position ) { throw new PageException ( "writeBytes would go out of bounds" ) ; } pageData . position ( position ) ; pageData . put ( buf , 0 , num ) ; }
write num bytes from buf at offset position .
