Esempio n. 1
0
 /**
  * To call this method the FileLogReader must have been created as writable.
  *
  * @param size
  * @throws IOException
  */
 public synchronized void truncate(long size) throws IOException {
   if (size < mRAF.length()) {
     mRAF.setLength(size);
     FileHeader hdr = getHeader();
     hdr.setFileSize(size);
     hdr.write(mRAF);
     mRAF.seek(size);
   }
 }