Package org.eclipse.hono.config
Class PemReader
- java.lang.Object
-
- org.eclipse.hono.config.PemReader
-
public final class PemReader extends Object
A reader for PEM files.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PemReader.Entry
An entry in a PEM file.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
readAll(io.vertx.core.Vertx vertx, Path path, io.vertx.core.Handler<io.vertx.core.AsyncResult<List<PemReader.Entry>>> handler)
Asynchronously reads a PEM file using vertx and report its entries.static List<PemReader.Entry>
readAll(Reader reader)
Reads a PEM file and return its entries.static List<PemReader.Entry>
readAll(Path path)
Reads a PEM file and return its entries.static List<PemReader.Entry>
readAllBlocking(io.vertx.core.Vertx vertx, Path path)
Reads a PEM file using vertx in blocking mode and return its entries.
-
-
-
Method Detail
-
readAll
public static List<PemReader.Entry> readAll(Path path) throws IOException
Reads a PEM file and return its entries.- Parameters:
path
- The file to read.- Returns:
- The PEM entries.
- Throws:
IOException
- I case of any error.
-
readAllBlocking
public static List<PemReader.Entry> readAllBlocking(io.vertx.core.Vertx vertx, Path path) throws IOException
Reads a PEM file using vertx in blocking mode and return its entries.- Parameters:
vertx
- The vertx instance to use.path
- The file to read.- Returns:
- The PEM entries.
- Throws:
IOException
- I case of any error.
-
readAll
public static void readAll(io.vertx.core.Vertx vertx, Path path, io.vertx.core.Handler<io.vertx.core.AsyncResult<List<PemReader.Entry>>> handler)
Asynchronously reads a PEM file using vertx and report its entries.- Parameters:
vertx
- The vertx instance to use.path
- The file to read.handler
- The handler to receive the result
-
readAll
public static List<PemReader.Entry> readAll(Reader reader) throws IOException
Reads a PEM file and return its entries.- Parameters:
reader
- The source to read from.- Returns:
- The list of entries.
- Throws:
IOException
- In case of any error.
-
-