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

📄 u16namebase.java

📁 linux下建立JAVA虚拟机的源码KAFFE
💻 JAVA
字号:
// Copyright (c) 2004 Brian Wellington (bwelling@xbill.org)package org.xbill.DNS;import java.io.*;/** * Implements common functionality for the many record types whose format * is an unsigned 16 bit integer followed by a name. * * @author Brian Wellington */abstract class U16NameBase extends Record {protected int u16Field;protected Name nameField;protectedU16NameBase() {}protectedU16NameBase(Name name, int type, int dclass, long ttl) {	super(name, type, dclass, ttl);}protectedU16NameBase(Name name, int type, int dclass, long ttl, int u16Field,	    String u16Description, Name nameField, String nameDescription){	super(name, type, dclass, ttl);	this.u16Field = checkU16(u16Description, u16Field);	this.nameField = checkName(nameDescription, nameField);}voidrrFromWire(DNSInput in) throws IOException {	u16Field = in.readU16();	nameField = new Name(in);}voidrdataFromString(Tokenizer st, Name origin) throws IOException {	u16Field = st.getUInt16();	nameField = st.getName(origin);}StringrrToString() {	StringBuffer sb = new StringBuffer();	sb.append(u16Field);	sb.append(" ");	sb.append(nameField);	return sb.toString();}protected intgetU16Field() {	return u16Field;}protected NamegetNameField() {	return nameField;}voidrrToWire(DNSOutput out, Compression c, boolean canonical) {	out.writeU16(u16Field);	nameField.toWire(out, null, canonical);}}

⌨️ 快捷键说明

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