Class PemReader


  • public final class PemReader
    extends Object
    A reader for PEM files.
    • 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.