java.lang.Object
org.bzdev.net.PemDecoder
PEM Decoder.
This decoder will decode PEM-encoded data and additionally will
provide the type of the data and any headers that may precede
the PEM-encoded data.
PEM encoding is defined in RFC 7468 and related RFCs.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PemDecoder.Result
decode
(InputStream is) Decode headers and PEM-encoded data from an input stream.static PemDecoder.Result
Decode headers and PEM-encoded data from a Reader.static PemDecoder.Result
Decode headers and PEM-encoded data from a string.
-
Constructor Details
-
PemDecoder
public PemDecoder()
-
-
Method Details
-
decode
Decode headers and PEM-encoded data from a Reader. This is a convenience method for the case were a Reader is available, but not an input stream.- Parameters:
r
- a reader providing optional headers and PEM-encoded data- Returns:
- a
PemDecoder.Result
object storing the decoded data - Throws:
IOException
- if an IO error occurred
-
decode
Decode headers and PEM-encoded data from a string.- Parameters:
string
- a string containing optional headers and PEM-encoded data- Returns:
- a
PemDecoder.Result
object storing the decoded data - Throws:
IOException
- if an IO error occurred
-
decode
Decode headers and PEM-encoded data from an input stream.- Parameters:
is
- an input stream containing optional headers and PEM-encoded data- Returns:
- a
PemDecoder.Result
object storing the decoded data - Throws:
IOException
- if an IO error occurred
-