本文整理了Java中org.xbill.DNS.Header.clone()
方法的一些代码示例,展示了Header.clone()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Header.clone()
方法的具体详情如下:
包路径:org.xbill.DNS.Header
类名称:Header
方法名:clone
暂无
代码示例来源:origin: dnsjava/dnsjava
/**
* Creates a copy of this Message. This is done by the Resolver before adding
* TSIG and OPT records, for example.
* @see Resolver
* @see TSIGRecord
* @see OPTRecord
*/
public Object
clone() {
Message m = new Message();
for (int i = 0; i < sections.length; i++) {
if (sections[i] != null)
m.sections[i] = new LinkedList(sections[i]);
}
m.header = (Header) header.clone();
m.size = size;
return m;
}
代码示例来源:origin: tiandawu/IotXmpp
/**
* Creates a copy of this Message. This is done by the Resolver before adding
* TSIG and OPT records, for example.
* @see Resolver
* @see TSIGRecord
* @see OPTRecord
*/
public Object
clone() {
Message m = new Message();
for (int i = 0; i < sections.length; i++) {
if (sections[i] != null)
m.sections[i] = new LinkedList(sections[i]);
}
m.header = (Header) header.clone();
m.size = size;
return m;
}
代码示例来源:origin: net.sf.dnsjava-osgi/dnsjava-osgi
/**
* Creates a copy of this Message. This is done by the Resolver before adding
* TSIG and OPT records, for example.
* @see Resolver
* @see TSIGRecord
* @see OPTRecord
*/
public Object
clone() {
Message m = new Message();
for (int i = 0; i < sections.length; i++) {
if (sections[i] != null)
m.sections[i] = new LinkedList(sections[i]);
}
m.header = (Header) header.clone();
m.size = size;
return m;
}
代码示例来源:origin: org.littleshoot/dnsjava
/**
* Creates a copy of this Message. This is done by the Resolver before adding
* TSIG and OPT records, for example.
* @see Resolver
* @see TSIGRecord
* @see OPTRecord
*/
public Object
clone() {
Message m = new Message();
for (int i = 0; i < sections.length; i++) {
if (sections[i] != null)
m.sections[i] = new LinkedList(sections[i]);
}
m.header = (Header) header.clone();
m.size = size;
return m;
}
代码示例来源:origin: posicks/mdnsjava
Header header = (Header) message.getHeader().clone();
代码示例来源:origin: org.littleshoot/dnsjava
static void
verifyMessage(Message message, byte [] bytes, SIGRecord sig, SIGRecord previous,
KEYRecord key) throws DNSSECException
{
if (!matches(sig, key))
throw new KeyMismatchException(key, sig);
Date now = new Date();
if (now.compareTo(sig.getExpire()) > 0)
throw new SignatureExpiredException(sig.getExpire(), now);
if (now.compareTo(sig.getTimeSigned()) < 0)
throw new SignatureNotYetValidException(sig.getTimeSigned(),
now);
DNSOutput out = new DNSOutput();
digestSIG(out, sig);
if (previous != null)
out.writeByteArray(previous.getSignature());
Header header = (Header) message.getHeader().clone();
header.decCount(Section.ADDITIONAL);
out.writeByteArray(header.toWire());
out.writeByteArray(bytes, Header.LENGTH,
message.sig0start - Header.LENGTH);
verify(key.getPublicKey(), sig.getAlgorithm(),
out.toByteArray(), sig.getSignature());
}
代码示例来源:origin: tiandawu/IotXmpp
out.writeByteArray(previous.getSignature());
Header header = (Header) message.getHeader().clone();
header.decCount(Section.ADDITIONAL);
out.writeByteArray(header.toWire());
代码示例来源:origin: dnsjava/dnsjava
out.writeByteArray(previous.getSignature());
Header header = (Header) message.getHeader().clone();
header.decCount(Section.ADDITIONAL);
out.writeByteArray(header.toWire());
代码示例来源:origin: tiandawu/IotXmpp
if (skipped != 0) {
if (newheader == null)
newheader = (Header) header.clone();
if (i != Section.ADDITIONAL)
newheader.setFlag(Flags.TC);
newheader = (Header) header.clone();
tsigrec.toWire(out, Section.ADDITIONAL, c);
newheader.incCount(Section.ADDITIONAL);
代码示例来源:origin: net.sf.dnsjava-osgi/dnsjava-osgi
if (i != Section.ADDITIONAL) {
if (newheader == null)
newheader = (Header) header.clone();
newheader.setFlag(Flags.TC);
int count = newheader.getCount(i);
newheader = (Header) header.clone();
tsigrec.toWire(out, Section.ADDITIONAL, c);
newheader.incCount(Section.ADDITIONAL);
代码示例来源:origin: org.littleshoot/dnsjava
if (skipped != 0) {
if (newheader == null)
newheader = (Header) header.clone();
if (i != Section.ADDITIONAL)
newheader.setFlag(Flags.TC);
newheader = (Header) header.clone();
tsigrec.toWire(out, Section.ADDITIONAL, c);
newheader.incCount(Section.ADDITIONAL);
内容来源于网络,如有侵权,请联系作者删除!