Closeable, AutoCloseable, Readablepublic class PEMReader extends PEMReader
PasswordCache.| Constructor | Description |
|---|---|
PEMReader(File in) |
Create PEMReader for a File
|
PEMReader(File in,
String msg) |
Create PEMReader for an encrypted File
|
| Modifier and Type | Method | Description |
|---|---|---|
Object |
readObject() |
|
static Object |
readObject(File in) |
Return single object from PEM file.
|
static Object |
readObject(File in,
Class<?> type) |
Return single object from PEM file.
|
static Object |
readObject(File in,
Class<?> type,
String msg) |
Return single object from encrypted PEM file.
|
static Object |
readObject(File in,
String msg) |
Return single object from encrypted PEM file.
|
close, lines, mark, markSupported, read, read, readLine, ready, reset, skipclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadPemObjectread, read, transferTopublic PEMReader(File in) throws FileNotFoundException
FileNotFoundExceptionpublic PEMReader(File in, String msg) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionpublic static Object readObject(File in) throws FileNotFoundException, IOException
The first object will be returned, others are discarded.
FileNotFoundExceptionIOExceptionpublic Object readObject() throws IOException
This method also invalidates the password when an IOException occurs
and throws a PasswordCancelledException when the user cancelled the
password entry.
This method accepts garbage before and after any PEM blocks (outside of BEGIN/END). BouncyCastle 1.46 does not accept this (earlier versions do).
Currently uses BufferedReader.mark(int) and BufferedReader.reset(), so these cannot be used by
calling code, sorry.
readObject in class PEMReaderIOExceptionpublic static Object readObject(File in, Class<?> type) throws FileNotFoundException, IOException
This version accepts a type as argument. The first object that matches the type is returned, others are discarded.
FileNotFoundExceptionIOExceptionpublic static Object readObject(File in, String msg) throws FileNotFoundException, IOException
The first object will be returned, others are discarded.
FileNotFoundExceptionIOExceptionpublic static Object readObject(File in, Class<?> type, String msg) throws FileNotFoundException, IOException
This version accepts a type as argument. The first object that matches the type is returned, others are discarded.
FileNotFoundExceptionIOExceptionCopyright © 2010-2018 Nikhef / Stichting FOM. All Rights Reserved.