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

📄 nullrecord.java

📁 linux下建立JAVA虚拟机的源码KAFFE
💻 JAVA
字号:
// Copyright (c) 2004 Brian Wellington (bwelling@xbill.org)package org.xbill.DNS;import java.io.*;/** * The NULL Record.  This has no defined purpose, but can be used to * hold arbitrary data. * * @author Brian Wellington */public class NULLRecord extends Record {private byte [] data;NULLRecord() {}RecordgetObject() {	return new NULLRecord();}/** * Creates a NULL record from the given data. * @param data The contents of the record. */publicNULLRecord(Name name, int dclass, long ttl, byte [] data) {	super(name, Type.NULL, dclass, ttl);	if (data.length > 0xFFFF) {		throw new IllegalArgumentException("data must be <65536 bytes");	}	this.data = data;}voidrrFromWire(DNSInput in) throws IOException {	data = in.readByteArray();}voidrdataFromString(Tokenizer st, Name origin) throws IOException {	throw st.exception("no defined text format for NULL records");}StringrrToString() {	return unknownToString(data);}/** Returns the contents of this record. */public byte []getData() {	return data;}voidrrToWire(DNSOutput out, Compression c, boolean canonical) {	out.writeByteArray(data);}}

⌨️ 快捷键说明

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