コード例 #1
0
ファイル: KEYRecord.java プロジェクト: lemmy/dnsjava
 KEYRecord(Name _name, short _dclass, int _ttl, int length, DataByteInputStream in, Compression c)
     throws IOException {
   super(_name, Type.KEY, _dclass, _ttl);
   if (in == null) return;
   flags = in.readShort();
   proto = in.readByte();
   alg = in.readByte();
   if (length > 4) {
     key = new byte[length - 4];
     in.read(key);
   }
 }
コード例 #2
0
ファイル: SIGBase.java プロジェクト: lemmy/dnsjava
 protected static Record rrFromWire(SIGBase rec, int length, DataByteInputStream in)
     throws IOException {
   if (in == null) return rec;
   int start = in.getPos();
   rec.covered = in.readUnsignedShort();
   rec.alg = in.readByte();
   rec.labels = in.readByte();
   rec.origttl = in.readUnsignedInt();
   rec.expire = new Date(1000 * (long) in.readInt());
   rec.timeSigned = new Date(1000 * (long) in.readInt());
   rec.footprint = in.readShort();
   rec.signer = new Name(in);
   rec.signature = new byte[length - (in.getPos() - start)];
   in.read(rec.signature);
   return rec;
 }
コード例 #3
0
ファイル: SIGRecord.java プロジェクト: lemmy/dnsjava
 Record rrFromWire(
     Name name, short type, short dclass, int ttl, int length, DataByteInputStream in)
     throws IOException {
   SIGRecord rec = new SIGRecord(name, dclass, ttl);
   if (in == null) return rec;
   int start = in.getPos();
   rec.covered = in.readShort();
   rec.alg = in.readByte();
   rec.labels = in.readByte();
   rec.origttl = in.readInt();
   rec.expire = new Date(1000 * (long) in.readInt());
   rec.timeSigned = new Date(1000 * (long) in.readInt());
   rec.footprint = in.readShort();
   rec.signer = new Name(in);
   rec.signature = new byte[length - (in.getPos() - start)];
   in.read(rec.signature);
   return rec;
 }