Exemple #1
0
 public static short value(String s) {
   short i = (short) classes.getValue(s.toUpperCase());
   if (i >= 0) return i;
   try {
     return Short.parseShort(s);
   } catch (Exception e) {
     return (-1);
   }
 }
Exemple #2
0
 public MXRecord(Name _name, short _dclass, int _ttl, MyStringTokenizer st, Name origin)
     throws IOException {
   super(_name, Type.MX, _dclass, _ttl);
   priority = Short.parseShort(st.nextToken());
   target = new Name(st.nextToken(), origin);
 }