Skip to content

Instantly share code, notes, and snippets.

@kasimok
Last active June 7, 2016 01:02
Show Gist options
  • Save kasimok/a8e66fa48caa34bd554a860ba724f84f to your computer and use it in GitHub Desktop.
Save kasimok/a8e66fa48caa34bd554a860ba724f84f to your computer and use it in GitHub Desktop.
Read file by RandomAccessFile
RandomAccessFile raf = new RandomAccessFile("certs/client/client.cer.pem", "r");
byte[] buf = new byte[(int) raf.length()];
raf.readFully(buf);
raf.close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment