Module com.zerodeplibs.webpush
Package com.zerodeplibs.webpush.key
Class PublicKeySources.PEMFileSourceBuilder
- java.lang.Object
-
- com.zerodeplibs.webpush.key.PublicKeySources.PEMFileSourceBuilder
-
- Enclosing class:
- PublicKeySources
public static class PublicKeySources.PEMFileSourceBuilder extends Object
The builder class for creating an instance ofPublicKeySourcefrom a PEM formatted file.- Author:
- Tomoki Sato
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PublicKeySourcebuild()Creates a newPublicKeySource.PublicKeySources.PEMFileSourceBuildercharset(Charset charset)Specifies the encoding of the PEM file.PublicKeySources.PEMFileSourceBuilderparser(PEMParser parser)Specifies a parser used to parse the content of the PEM file.
-
-
-
Method Detail
-
charset
public PublicKeySources.PEMFileSourceBuilder charset(Charset charset)
Specifies the encoding of the PEM file.- Parameters:
charset- the encoding of the PEM file.- Returns:
- this object.
-
parser
public PublicKeySources.PEMFileSourceBuilder parser(PEMParser parser)
Specifies a parser used to parse the content of the PEM file.- Parameters:
parser- a parser used to parse the content of the PEM file.- Returns:
- this object.
-
build
public PublicKeySource build() throws IOException
Creates a newPublicKeySource.- Returns:
- a new
PublicKeySource. - Throws:
IOException- if an I/O error occurs.MalformedPEMException- if the content of the file cannot be parsed as a valid PEM format.
-
-