home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2007 April / PCpro_2007_04.ISO / files / dsl / jNetTool.exe / org / xbill / DNS / SingleNameBase.class (.txt) < prev    next >
Encoding:
Java Class File  |  2005-06-05  |  1.9 KB  |  40 lines

  1. package org.xbill.DNS;
  2.  
  3. import java.io.IOException;
  4.  
  5. abstract class SingleNameBase extends Record {
  6.    protected Name singleName;
  7.  
  8.    protected SingleNameBase() {
  9.    }
  10.  
  11.    protected SingleNameBase(Name name, int type, int dclass, long ttl) {
  12.       super(name, type, dclass, ttl);
  13.    }
  14.  
  15.    protected SingleNameBase(Name name, int type, int dclass, long ttl, Name singleName, String description) {
  16.       super(name, type, dclass, ttl);
  17.       this.singleName = Record.checkName(description, singleName);
  18.    }
  19.  
  20.    void rrFromWire(DNSInput in) throws IOException {
  21.       this.singleName = new Name(in);
  22.    }
  23.  
  24.    void rdataFromString(Tokenizer st, Name origin) throws IOException {
  25.       this.singleName = st.getName(origin);
  26.    }
  27.  
  28.    String rrToString() {
  29.       return this.singleName.toString();
  30.    }
  31.  
  32.    protected Name getSingleName() {
  33.       return this.singleName;
  34.    }
  35.  
  36.    void rrToWire(DNSOutput out, Compression c, boolean canonical) {
  37.       this.singleName.toWire(out, (Compression)null, canonical);
  38.    }
  39. }
  40.