net.oauth.signature.pem
Class PEMReader
java.lang.Object
net.oauth.signature.pem.PEMReader
public class PEMReader
- extends java.lang.Object
This class convert PEM into byte array. The begin marker
is saved and it can be used to determine the type of the
PEM file.
- Author:
- zhang
Method Summary |
java.lang.String |
getBeginMarker()
|
byte[] |
getDerBytes()
|
protected void |
readFile()
Read the PEM file and save the DER encoded octet
stream and begin marker. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PRIVATE_PKCS1_MARKER
public static final java.lang.String PRIVATE_PKCS1_MARKER
- See Also:
- Constant Field Values
PRIVATE_PKCS8_MARKER
public static final java.lang.String PRIVATE_PKCS8_MARKER
- See Also:
- Constant Field Values
CERTIFICATE_X509_MARKER
public static final java.lang.String CERTIFICATE_X509_MARKER
- See Also:
- Constant Field Values
PUBLIC_X509_MARKER
public static final java.lang.String PUBLIC_X509_MARKER
- See Also:
- Constant Field Values
PEMReader
public PEMReader(java.io.InputStream inStream)
throws java.io.IOException
- Throws:
java.io.IOException
PEMReader
public PEMReader(byte[] buffer)
throws java.io.IOException
- Throws:
java.io.IOException
PEMReader
public PEMReader(java.lang.String fileName)
throws java.io.IOException
- Throws:
java.io.IOException
getDerBytes
public byte[] getDerBytes()
getBeginMarker
public java.lang.String getBeginMarker()
readFile
protected void readFile()
throws java.io.IOException
- Read the PEM file and save the DER encoded octet
stream and begin marker.
- Throws:
java.io.IOException
Copyright © 2009. All Rights Reserved.