Class DNFileReader

java.lang.Object
com.unboundid.util.DNFileReader
All Implemented Interfaces:
Closeable, AutoCloseable

@ThreadSafety(level=COMPLETELY_THREADSAFE) public final class DNFileReader extends Object implements Closeable
This class provides a mechanism for reading DNs from a file. The file is expected to have one DN per line. Blank lines and lines beginning with the octothorpe (#) character will be ignored. Lines may contain just the raw DN, or they may start with "dn:" followed by an optional space and the DN, or "dn::" followed by an optional space and the base64-encoded representation of the DN.
  • Constructor Details

    • DNFileReader

      public DNFileReader(@NotNull String path) throws IOException
      Creates a new DN file reader that will read from the file with the specified path.
      Parameters:
      path - The path to the file to be read. It must not be null and the file must exist.
      Throws:
      IOException - If a problem is encountered while opening the file for reading.
    • DNFileReader

      public DNFileReader(@NotNull File dnFile) throws IOException
      Creates a new DN file reader that will read from the specified file.
      Parameters:
      dnFile - The file to be read. It must not be null and the file must exist.
      Throws:
      IOException - If a problem is encountered while opening the file for reading.
  • Method Details