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