⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hinforecord.java

📁 DNS Java 是java实现的DNS
💻 JAVA
字号:
// Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org)package org.xbill.DNS;import java.io.*;/** * Host Information - describes the CPU and OS of a host * * @author Brian Wellington */public class HINFORecord extends Record {private byte [] cpu, os;HINFORecord() {}RecordgetObject() {	return new HINFORecord();}/** * Creates an HINFO Record from the given data * @param cpu A string describing the host's CPU * @param os A string describing the host's OS * @throws IllegalArgumentException One of the strings has invalid escapes */publicHINFORecord(Name name, int dclass, long ttl, String cpu, String os) {	super(name, Type.HINFO, dclass, ttl);	try {		this.cpu = byteArrayFromString(cpu);		this.os = byteArrayFromString(os);	}	catch (TextParseException e) {		throw new IllegalArgumentException(e.getMessage());	}}voidrrFromWire(DNSInput in) throws IOException {	cpu = in.readCountedString();	os = in.readCountedString();}voidrdataFromString(Tokenizer st, Name origin) throws IOException {	try {		cpu = byteArrayFromString(st.getString());		os = byteArrayFromString(st.getString());	}	catch (TextParseException e) {		throw st.exception(e.getMessage());	}}/** * Returns the host's CPU */public StringgetCPU() {	return byteArrayToString(cpu, false);}/** * Returns the host's OS */public StringgetOS() {	return byteArrayToString(os, false);}voidrrToWire(DNSOutput out, Compression c, boolean canonical) {	out.writeCountedString(cpu);	out.writeCountedString(os);}/** * Converts to a string */StringrrToString() {	StringBuffer sb = new StringBuffer();	sb.append(byteArrayToString(cpu, true));	sb.append(" ");	sb.append(byteArrayToString(os, true));	return sb.toString();}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -