org.xbill.DNS
Class Compression

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

public class Compression
extends java.lang.Object

DNS Name Compression object.

Author:
Brian Wellington
See Also:
Message, Name

Constructor Summary
Compression()
          Creates a new Compression object.
 
Method Summary
 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 Detail

Compression

public Compression()
Creates a new Compression object.

Method Detail

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.


Copyright © 2014. All Rights Reserved.