本文整理了Java中org.xbill.DNS.Record.toString
方法的一些代码示例,展示了Record.toString
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Record.toString
方法的具体详情如下:
包路径:org.xbill.DNS.Record
类名称:Record
方法名:toString
暂无
代码示例来源:origin: internetarchive/heritrix3
protected byte [] getDNSRecord(final long fetchStart,
final Record[] rrecordSet)
throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
// Start the record with a 14-digit date per RFC 2540
byte[] fetchDate = ArchiveUtils.get14DigitDate(fetchStart).getBytes();
baos.write(fetchDate);
// Don't forget the newline
baos.write("\n".getBytes());
if (rrecordSet != null) {
for (int i = 0; i < rrecordSet.length; i++) {
byte[] record = rrecordSet[i].toString().getBytes();
baos.write(record);
// Add the newline between records back in
baos.write("\n".getBytes());
}
}
return baos.toByteArray();
}
代码示例来源:origin: RIPE-NCC/hadoop-pcap
private String convertRecordToString(Record record) {
if (record == null)
return null;
String recordString = record.toString();
recordString = normalizeRecordString(recordString);
return recordString;
}
代码示例来源:origin: org.archive.heritrix/heritrix-modules
protected byte [] getDNSRecord(final long fetchStart,
final Record[] rrecordSet)
throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
// Start the record with a 14-digit date per RFC 2540
byte[] fetchDate = ArchiveUtils.get14DigitDate(fetchStart).getBytes();
baos.write(fetchDate);
// Don't forget the newline
baos.write("\n".getBytes());
if (rrecordSet != null) {
for (int i = 0; i < rrecordSet.length; i++) {
byte[] record = rrecordSet[i].toString().getBytes();
baos.write(record);
// Add the newline between records back in
baos.write("\n".getBytes());
}
}
return baos.toByteArray();
}
代码示例来源:origin: org.jboss.resteasy/resteasy-eagledns-fork
public static void main(String[] args) throws TextParseException, IOException {
File zoneFile = new File("zones/unlogic.se");
Master master = new Master(zoneFile.getPath(),Name.fromString(zoneFile.getName(), Name.root));
Record record = master._nextRecord();
Logger LOG = Logger.getLogger(ZoneDissasembler.class);
while(record != null){
LOG.info("Class: " + record.getClass());
LOG.info("Name: " + record.getName());
LOG.info("toString: " + record.toString());
record = master._nextRecord();
}
}
代码示例来源:origin: kamax-matrix/mxisd
log.info("Record: {}", record.toString());
if (record.getType() == Type.SRV) {
if (record instanceof SRVRecord) {
代码示例来源:origin: kamax-matrix/mxisd
srvRecords.add((SRVRecord) record);
} else {
log.info("Got non-SRV record: {}", record.toString());
内容来源于网络,如有侵权,请联系作者删除!