Package org.xbill.DNS

Class Compression

java.lang.Object
org.xbill.DNS.Compression

public class Compression extends Object
DNS Name Compression object.
Author:
Brian Wellington
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new Compression object.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(int pos, Name name)
    Adds a compression entry mapping a name to a position in a message.
    int
    get(Name name)
    Retrieves the position of the given name, if it has been previously included in the message.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Compression

      public Compression()
      Creates a new Compression object.
  • Method Details

    • add

      public void add(int pos, Name name)
      Adds a compression entry mapping a name to a position in a message.
      Parameters:
      pos - The position at which the name is added.
      name - The name being added to the message.
    • get

      public int get(Name name)
      Retrieves the position of the given name, if it has been previously included in the message.
      Parameters:
      name - The name to find in the compression table.
      Returns:
      The position of the name, or -1 if not found.