- public char[] getPEMAsCharArray() {
-
- InputStream is = getClass().getResourceAsStream("/RSA.pk");
- try {
- return IOUtils.toCharArray(is);
- } catch (IOException e) {
- e.printStackTrace();
- }
- return null;
+ public char[] getPEMAsCharArray() throws Exception {
+ char [] PEM = IOUtils.toCharArray(privateKeyFileInputStream);
+ privateKeyFileInputStream.close();
+ return PEM;