コード例 #1
0
ファイル: CERTRecord.java プロジェクト: lemmy/dnsjava
 Record rdataFromString(Name name, int dclass, long ttl, Tokenizer st, Name origin)
     throws IOException {
   CERTRecord rec = new CERTRecord(name, dclass, ttl);
   rec.certType = st.getUInt16();
   rec.keyTag = st.getUInt16();
   rec.alg = st.getUInt8();
   rec.cert = base64.fromString(remainingStrings(st));
   return rec;
 }
コード例 #2
0
ファイル: SIGBase.java プロジェクト: lemmy/dnsjava
 protected static Record rdataFromString(SIGBase rec, Tokenizer st, Name origin)
     throws IOException {
   String typeString = st.getString();
   int covered = Type.value(typeString);
   if (covered < 0) throw st.exception("Invalid type: " + typeString);
   rec.covered = covered;
   String algString = st.getString();
   int alg = DNSSEC.Algorithm.value(algString);
   if (alg < 0) throw st.exception("Invalid algorithm: " + algString);
   rec.alg = alg;
   rec.labels = st.getUInt8();
   rec.origttl = st.getTTL();
   rec.expire = FormattedTime.parse(st.getString());
   rec.timeSigned = FormattedTime.parse(st.getString());
   rec.footprint = st.getUInt16();
   rec.signer = st.getName(origin);
   rec.signature = st.getBase64();
   return rec;
 }