Class PemChain
java.lang.Object
dev.getelements.elements.sdk.model.security.PemChain
Represents a chain of key specifications which may be found in a single PEM file.
-
Constructor Summary
ConstructorsConstructorDescriptionPemChain
(BufferedReader reader) Constructs aPemChain
from aBufferedReader
.PemChain
(InputStream inputStream) Constructs aPemChain
from 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
.int
size()
Gets the number of entries in the chain.
-
Constructor Details
-
PemChain
- Parameters:
pemString
- the string containing the PEM Chain File- Throws:
InvalidPemException
-
PemChain
Constructs aPemChain
from anInputStream
.- Parameters:
inputStream
- anInputStream
with the contents of a PEM Chain file.- Throws:
InvalidPemException
-
PemChain
- Parameters:
reader
- anReader
with the contents of a PEM Chain file.- Throws:
InvalidPemException
-
PemChain
Constructs aPemChain
from aBufferedReader
.- Parameters:
reader
- anBufferedReader
with 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
Optional
specifying the requested label or null
-
findFirstWithLabel
Finds the first speck with the suppliedRfc7468Label
.- Parameters:
label
- theRfc7468Label
to find- Returns:
- an
Optional
specifying the requested label or null
-