Class CachedPEMReader
- java.lang.Object
-
- java.io.Reader
-
- java.io.BufferedReader
-
- org.bouncycastle.util.io.pem.PemReader
-
- org.bouncycastle.openssl.PEMParser
-
- eu.emi.security.authn.x509.helpers.CachedPEMReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.lang.Readable
public class CachedPEMReader extends org.bouncycastle.openssl.PEMParserThis class extends thePEMParserclass from the BC library. It is modified to use the provided PemObject (it is done to optimize the code: pem is not read twice) as otherwise BC's parsers code would need to be copied. The reader is bootstraped with the data from the PemObject.This class interface is the readObject method.
This implementation overrides the
PEMParserreadPemObject method to return a providedPemObject. The Reader used by thePEMParseris not used.- Author:
- K. Benedyczak
-
-
Field Summary
Fields Modifier and Type Field Description protected org.bouncycastle.util.io.pem.PemObjectpem
-
Constructor Summary
Constructors Constructor Description CachedPEMReader(org.bouncycastle.util.io.pem.PemObject pem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.util.io.pem.PemObjectreadPemObject()Generate BC's PemObject from the input stream.
-
-
-
Method Detail
-
readPemObject
public org.bouncycastle.util.io.pem.PemObject readPemObject() throws java.io.IOExceptionGenerate BC's PemObject from the input stream.- Overrides:
readPemObjectin classorg.bouncycastle.util.io.pem.PemReader- Returns:
- the parsed PEM object
- Throws:
java.io.IOException- IO exception
-
-