예제 #1
0
 /**
  * Creates an ISDN Record from the given data
  *
  * @param address The ISDN number associated with the domain.
  * @param subAddress The subaddress, if any.
  * @throws IllegalArgumentException One of the strings is invalid.
  */
 public ISDNRecord(Name name, int dclass, long ttl, String address, String subAddress) {
   super(name, Type.ISDN, dclass, ttl);
   try {
     this.address = byteArrayFromString(address);
     if (subAddress != null) this.subAddress = byteArrayFromString(subAddress);
   } catch (TextParseException e) {
     throw new IllegalArgumentException(e.getMessage());
   }
 }
예제 #2
0
 void rdataFromString(Tokenizer st, Name origin) throws IOException {
   try {
     address = byteArrayFromString(st.getString());
     Tokenizer.Token t = st.get();
     if (t.isString()) {
       subAddress = byteArrayFromString(t.value);
     } else {
       st.unget();
     }
   } catch (TextParseException e) {
     throw st.exception(e.getMessage());
   }
 }