Created
August 26, 2016 17:43
-
-
Save acidlychee/bea92da9f1eacf98b6595c20cc1e153f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void convertFileToBase64() { | |
| String path = this.getClass().getClassLoader().getResource("10012312135.pfx").getPath(); | |
| try { | |
| byte[] b = Files.toByteArray(new File(path)); | |
| System.out.println(Base64.encodeBase64String(b)); | |
| } catch (IOException e) { | |
| e.printStackTrace(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment