Package org.eclipse.hono.config
Class PemReader
java.lang.Object
org.eclipse.hono.config.PemReader
A reader for PEM files.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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>
Reads a PEM file and return its entries.static List<PemReader.Entry>
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 Details
-
readAll
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
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.
-