Package dev.getelements.elements.rt.util
Class PemChain
java.lang.Object
dev.getelements.elements.rt.util.PemChain
Represents a chain of key specifications which may be found in a single PEM file.
-
Constructor Summary
ConstructorsConstructorDescriptionPemChain(BufferedReader reader) Constructs aPemChainfrom aBufferedReader.PemChain(InputStream inputStream) Constructs aPemChainfrom anInputStream. -
Method Summary
Modifier and TypeMethodDescriptionfindFirstWithLabel(Rfc7468Label label) Finds the first speck with the suppliedRfc7468Label.findFirstWithLabel(String label) Finds the first speck with the supplied label.getChain()Gets the chain ofPemData.intsize()Gets the number of entries in the chain.
-
Constructor Details
-
PemChain
- Parameters:
pemString- the string containing the PEM Chain File- Throws:
InvalidPemException
-
PemChain
Constructs aPemChainfrom anInputStream.- Parameters:
inputStream- anInputStreamwith the contents of a PEM Chain file.- Throws:
InvalidPemException
-
PemChain
- Parameters:
reader- anReaderwith the contents of a PEM Chain file.- Throws:
InvalidPemException
-
PemChain
Constructs aPemChainfrom aBufferedReader.- Parameters:
reader- anBufferedReaderwith the contents of a PEM Chain file.- Throws:
InvalidPemException
-
-
Method Details
-
size
public int size()Gets the number of entries in the chain.- Returns:
- the number of entries in the chain
-
getChain
Gets the chain ofPemData. -
findFirstWithLabel
Finds the first speck with the supplied label.- Parameters:
label- the label to find- Returns:
- an
Optionalspecifying the requested label or null
-
findFirstWithLabel
Finds the first speck with the suppliedRfc7468Label.- Parameters:
label- theRfc7468Labelto find- Returns:
- an
Optionalspecifying the requested label or null
-