WKSRecord (dnsjava documentation)
Date: 2013-04-10

org.xbill.DNS

## Class WKSRecord

- java.lang.Object
- - org.xbill.DNS.Record
  - - org.xbill.DNS.WKSRecord

- All Implemented Interfaces:
    Serializable, Cloneable, Comparable

      public class WKSRecord
      extends Record

  Well Known Services - Lists services offered by this host.
  Author:
    Brian Wellington
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `WKSRecord.Protocol`
    `static class` | `WKSRecord.Service`

  - ### Field Summary

    - ### Fields inherited from class org.xbill.DNS.Record

      `dclass, name, ttl, type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WKSRecord(Name name, int dclass, long ttl, InetAddress address, int protocol, int[] services)` Creates a WKS Record from the given data

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `InetAddress` | `getAddress()` Returns the IP address.
    `int` | `getProtocol()` Returns the IP protocol.
    `int[]` | `getServices()` Returns the services provided by the host on the specified address.

    - ### Methods inherited from class org.xbill.DNS.Record

      `byteArrayFromString, byteArrayToString, compareTo, equals, fromString, fromString, fromWire, getAdditionalName, getDClass, getName, getRRsetType, getTTL, getType, hashCode, newRecord, newRecord, newRecord, newRecord, rdataToString, rdataToWireCanonical, sameRRset, toString, toWire, toWireCanonical, unknownToString, withName`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### WKSRecord

          public WKSRecord(Name name,
                   int dclass,
                   long ttl,
                   InetAddress address,
                   int protocol,
                   int[] services)

      Creates a WKS Record from the given data
      Parameters:
        `address` - The IP address
        `protocol` - The IP protocol number
        `services` - An array of supported services, represented by port number.

  - ### Method Detail

    - #### getAddress

          public InetAddress getAddress()

      Returns the IP address.

    - #### getProtocol

          public int getProtocol()

      Returns the IP protocol.

    - #### getServices

          public int[] getServices()

      Returns the services provided by the host on the specified address.