DANEEntry (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.cert.dane

## Class DANEEntry

- java.lang.Object
- - org.bouncycastle.cert.dane.DANEEntry

-     public class DANEEntry
      extends java.lang.Object

  Carrier class for a DANE entry.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DANEEntry(java.lang.String domainName, byte[] data)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `X509CertificateHolder` | `getCertificate()` Return the certificate associated with this entry.
    `java.lang.String` | `getDomainName()`
    `byte[]` | `getFlags()`
    `byte[]` | `getRDATA()` Return the full data string as it would appear in the DNS record - flags + encoding
    `static boolean` | `isValidCertificate(byte[] data)` Return true if the byte string has the correct flag bytes to indicate a certificate entry.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DANEEntry

          public DANEEntry(java.lang.String domainName,
                   byte[] data)
                    throws java.io.IOException

      Throws:
        `java.io.IOException`

  - ### Method Detail

    - #### getFlags

          public byte[] getFlags()

    - #### getCertificate

          public X509CertificateHolder getCertificate()

      Return the certificate associated with this entry.
      Returns:
        the entry's certificate.

    - #### getDomainName

          public java.lang.String getDomainName()

    - #### getRDATA

          public byte[] getRDATA()
                          throws java.io.IOException

      Return the full data string as it would appear in the DNS record - flags + encoding
      Returns:
        byte array representing the full data string.
      Throws:
        `java.io.IOException` - if there is an issue encoding the certificate inside this entry.

    - #### isValidCertificate

          public static boolean isValidCertificate(byte[] data)

      Return true if the byte string has the correct flag bytes to indicate a certificate entry.
      Parameters:
        `data` - the byte string of interest.
      Returns:
        true if flags indicate a valid certificate, false otherwise.