public void write(byte[] b,int off,int len){
  if (SysProperties.CHECK && (len < 0 || len % Constants.FILE_BLOCK_SIZE != 0)) {
    DbException.throwInternalError("unaligned write " + name + " len "+ len);
  }
  checkWritingAllowed();
  checkPowerOff();
  try {
    FileUtils.writeFully(file,ByteBuffer.wrap(b,off,len));
  }
 catch (  IOException e) {
    closeFileSilently();
    throw DbException.convertIOException(e,name);
  }
  filePos+=len;
  fileLength=Math.max(filePos,fileLength);
}

public void write ( byte [ ] b , int off , int len ) { if ( SysProperties . CHECK && ( len < 0 || len % Constants . FILE_BLOCK_SIZE != 0 ) ) { DbException . throwInternalError ( "unaligned write " + name + " len " + len ) ; } checkWritingAllowed ( ) ; checkPowerOff ( ) ; try { FileUtils . writeFully ( file , ByteBuffer . wrap ( b , off , len ) ) ; } catch ( IOException e ) { closeFileSilently ( ) ; throw DbException . convertIOException ( e , name ) ; } filePos += len ; fileLength = Math . max ( filePos , fileLength ) ; }
write a number of bytes .
