Class PronounRecordParser

java.lang.Object
me.folf.podns4j.PronounRecordParser

public class PronounRecordParser extends Object
Parser for pronoun records according to the Pronouns over DNS specification.
  • Constructor Details

    • PronounRecordParser

      public PronounRecordParser()
  • Method Details

    • parse

      public static PronounRecord parse(String record) throws PronounParseException
      Parses a pronoun record from a DNS TXT record string.
      Parameters:
      record - the record string to parse
      Returns:
      the parsed pronoun record
      Throws:
      PronounParseException - if the record is invalid
    • validateRecords

      public static void validateRecords(List<PronounRecord> records) throws PronounParseException
      Validates that a list of records is valid according to the specification. This checks that if a NONE record is present, it must be the only record.
      Parameters:
      records - the records to validate
      Throws:
      PronounParseException - if the records are invalid