示例#1
0
文件: DClass.java 项目: lemmy/dnsjava
 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);
   }
 }
示例#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);
 }