Hi,

The following github link is to the PEM API as it is written in the draft JEP (https://openjdk.org/jeps/8300911). There has been a few changes since the original posting.

https://github.com/ascarpino/jdk/tree/pem

The Encoder and PEMEncoder to now return byte[] for the encode() method. A new PEMEncoder method, encodeToString(), was added. I believe these make it easier for outputting data to a file and InputStreams, while still supporting a method that returns a String.

For decode, InputStream has replaced Reader. There were comments preferring InputStream and I found that Reader's buffering quirks were problematic. Decoding from a byte[] is easy through an ByteArrayInputStream.

If you are interested in testing out the API, please download and compile the repo. Then let me know how your experience went.

thanks

Tony

Reply via email to