Class DefaultDnsRecordEncoder

    • Constructor Detail

      • DefaultDnsRecordEncoder

        protected DefaultDnsRecordEncoder()
        Creates a new instance.
    • Method Detail

      • encodeRecord0

        private void encodeRecord0​(DnsRecord record,
                                   ByteBuf out)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • encodePtrRecord

        private void encodePtrRecord​(DnsPtrRecord record,
                                     ByteBuf out)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • encodeOptPseudoRecord

        private void encodeOptPseudoRecord​(DnsOptPseudoRecord record,
                                           ByteBuf out)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • encodeOptEcsRecord

        private void encodeOptEcsRecord​(DnsOptEcsRecord record,
                                        ByteBuf out)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • calculateEcsAddressLength

        static int calculateEcsAddressLength​(int sourcePrefixLength,
                                             int lowOrderBitsToPreserve)
      • encodeRawRecord

        private void encodeRawRecord​(DnsRawRecord record,
                                     ByteBuf out)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • encodeName

        protected void encodeName​(java.lang.String name,
                                  ByteBuf buf)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • padWithZeros

        private static byte padWithZeros​(byte b,
                                         int lowOrderBitsToPreserve)