/** Returns a concatenation of the remaining strings from a Tokenizer. */
 private String remainingStrings() throws IOException {
   StringBuffer buffer = null;
   while (true) {
     Tokenizer.Token t = get();
     if (!t.isString()) break;
     if (buffer == null) buffer = new StringBuffer();
     buffer.append(t.value);
   }
   unget();
   if (buffer == null) return null;
   return buffer.toString();
 }
Exemple #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());
   }
 }
Exemple #3
0
 public TypeBitmap(Tokenizer st) throws IOException {
   this();
   while (true) {
     Tokenizer.Token t = st.get();
     if (!t.isString()) break;
     int typecode = Type.value(t.value);
     if (typecode < 0) {
       throw st.exception("Invalid type: " + t.value);
     }
     types.add(Mnemonic.toInteger(typecode));
   }
   st.unget();
 }