code: private void dump(long offset, File outFile) throws IOException {
          try (RandomAccessFile raf = new RandomAccessFile(file, "r");
                  FileOutputStream out = new FileOutputStream(outFile)) {
              raf.seek(offset);
              byte[] buffer = new byte[2048];
              int bytesRead;
              while ((bytesRead = raf.read(buffer)) != -1) {
                  out.write(buffer, 0, bytesRead);
              }
          }
      }
docs: Dumps the last part of the file beginning at the specified offset.
  
  @param offset
  @throws IOException