Java Doc for Name.java in  » Net » dnsjava » org » xbill » DNS » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » dnsjava » org.xbill.DNS 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.xbill.DNS.Name

Name
public class Name implements Comparable(Code)
A representation of a domain name. It may either be absolute (fully qualified) or relative.
author:
   Brian Wellington


Field Summary
final public static  Nameempty
    
final public static  Nameroot
    

Constructor Summary
public  Name(String s, Name origin)
     Create a new name from a string and an origin.
public  Name(String s)
     Create a new name from a string.
public  Name(DNSInput in)
    
public  Name(byte[] b)
    
public  Name(Name src, int n)
    

Method Summary
public  intcompareTo(Object o)
     Compares this Name to another Object.
Parameters:
  o - The Object to be compared.
public static  Nameconcatenate(Name prefix, Name suffix)
     Creates a new name by concatenating two existing names.
Parameters:
  prefix - The prefix name.
Parameters:
  suffix - The suffix name.
public  booleanequals(Object arg)
    
public static  NamefromConstantString(String s)
     Create a new name from a constant string.
public  NamefromDNAME(DNAMERecord dname)
     Generates a new Name to be used when following a DNAME.
Parameters:
  dname - The DNAME record to follow.
public static  NamefromString(String s, Name origin)
     Create a new name from a string and an origin.
public static  NamefromString(String s)
     Create a new name from a string.
public  byte[]getLabel(int n)
     Retrieve the nth label of a Name.
public  StringgetLabelString(int n)
     Convert the nth label in a Name to a String
Parameters:
  n - The label to be converted to a (printable) String.
public  inthashCode()
    
public  booleanisAbsolute()
    
public  booleanisWild()
    
public  intlabels()
     The number of labels in the name.
public  shortlength()
     The length of the name.
public  Namerelativize(Name origin)
     If this name is a subdomain of origin, return a new name relative to origin with the same value.
public  booleansubdomain(Name domain)
    
public  StringtoString()
    
public  voidtoWire(DNSOutput out, Compression c)
    
public  byte[]toWire()
    
public  voidtoWire(DNSOutput out, Compression c, boolean canonical)
    
public  voidtoWireCanonical(DNSOutput out)
    
public  byte[]toWireCanonical()
    
public  Namewild(int n)
    

Field Detail
empty
final public static Name empty(Code)
The root name



root
final public static Name root(Code)
The root name




Constructor Detail
Name
public Name(String s, Name origin) throws TextParseException(Code)
Create a new name from a string and an origin. This does not automatically make the name absolute; it will be absolute if it has a trailing dot or an absolute origin is appended.
Parameters:
  s - The string to be converted
Parameters:
  origin - If the name is not absolute, the origin to be appended.
throws:
  TextParseException - The name is invalid.



Name
public Name(String s) throws TextParseException(Code)
Create a new name from a string. This does not automatically make the name absolute; it will be absolute if it has a trailing dot.
Parameters:
  s - The string to be converted
throws:
  TextParseException - The name is invalid.



Name
public Name(DNSInput in) throws WireParseException(Code)
Create a new name from DNS a wire format message
Parameters:
  in - A stream containing the DNS message which is currentlypositioned at the start of the name to be read.



Name
public Name(byte[] b) throws IOException(Code)
Create a new name from DNS wire format
Parameters:
  b - A byte array containing the wire format of the name.



Name
public Name(Name src, int n)(Code)
Create a new name by removing labels from the beginning of an existing Name
Parameters:
  src - An existing Name
Parameters:
  n - The number of labels to remove from the beginning in the copy




Method Detail
compareTo
public int compareTo(Object o)(Code)
Compares this Name to another Object.
Parameters:
  o - The Object to be compared. The value 0 if the argument is a name equivalent to this name;a value less than 0 if the argument is less than this name in the canonical ordering, and a value greater than 0 if the argument is greater than thisname in the canonical ordering.
throws:
  ClassCastException - if the argument is not a Name.



concatenate
public static Name concatenate(Name prefix, Name suffix) throws NameTooLongException(Code)
Creates a new name by concatenating two existing names.
Parameters:
  prefix - The prefix name.
Parameters:
  suffix - The suffix name. The concatenated name.
throws:
  NameTooLongException - The name is too long.



equals
public boolean equals(Object arg)(Code)
Are these two Names equivalent?



fromConstantString
public static Name fromConstantString(String s)(Code)
Create a new name from a constant string. This should only be used when the name is known to be good - that is, when it is constant.
Parameters:
  s - The string to be converted
throws:
  IllegalArgumentException - The name is invalid.



fromDNAME
public Name fromDNAME(DNAMERecord dname) throws NameTooLongException(Code)
Generates a new Name to be used when following a DNAME.
Parameters:
  dname - The DNAME record to follow. The constructed name.
throws:
  NameTooLongException - The resulting name is too long.



fromString
public static Name fromString(String s, Name origin) throws TextParseException(Code)
Create a new name from a string and an origin. This does not automatically make the name absolute; it will be absolute if it has a trailing dot or an absolute origin is appended. This is identical to the constructor, except that it will avoid creating new objects in some cases.
Parameters:
  s - The string to be converted
Parameters:
  origin - If the name is not absolute, the origin to be appended.
throws:
  TextParseException - The name is invalid.



fromString
public static Name fromString(String s) throws TextParseException(Code)
Create a new name from a string. This does not automatically make the name absolute; it will be absolute if it has a trailing dot. This is identical to the constructor, except that it will avoid creating new objects in some cases.
Parameters:
  s - The string to be converted
throws:
  TextParseException - The name is invalid.



getLabel
public byte[] getLabel(int n)(Code)
Retrieve the nth label of a Name. This makes a copy of the label; changing this does not change the Name.
Parameters:
  n - The label to be retrieved. The first label is 0.



getLabelString
public String getLabelString(int n)(Code)
Convert the nth label in a Name to a String
Parameters:
  n - The label to be converted to a (printable) String. The firstlabel is 0.



hashCode
public int hashCode()(Code)
Computes a hashcode based on the value



isAbsolute
public boolean isAbsolute()(Code)
Is this name absolute?



isWild
public boolean isWild()(Code)
Is this name a wildcard?



labels
public int labels()(Code)
The number of labels in the name.



length
public short length()(Code)
The length of the name.



relativize
public Name relativize(Name origin)(Code)
If this name is a subdomain of origin, return a new name relative to origin with the same value. Otherwise, return the existing name.
Parameters:
  origin - The origin to remove. The possibly relativized name.



subdomain
public boolean subdomain(Name domain)(Code)
Is the current Name a subdomain of the specified name?



toString
public String toString()(Code)
Convert a Name to a String The representation of this name as a (printable) String.



toWire
public void toWire(DNSOutput out, Compression c)(Code)
Emit a Name in DNS wire format
Parameters:
  out - The output stream containing the DNS message.
Parameters:
  c - The compression context, or null of no compression is desired.
throws:
  IllegalArgumentException - The name is not absolute.



toWire
public byte[] toWire()(Code)
Emit a Name in DNS wire format
throws:
  IllegalArgumentException - The name is not absolute.



toWire
public void toWire(DNSOutput out, Compression c, boolean canonical)(Code)
Emit a Name in DNS wire format
Parameters:
  out - The output stream containing the DNS message.
Parameters:
  c - The compression context, or null of no compression is desired.
Parameters:
  canonical - If true, emit the name in canonicalized form(all lowercase).
throws:
  IllegalArgumentException - The name is not absolute.



toWireCanonical
public void toWireCanonical(DNSOutput out)(Code)
Emit a Name in canonical DNS wire format (all lowercase)
Parameters:
  out - The output stream to which the message is written.



toWireCanonical
public byte[] toWireCanonical()(Code)
Emit a Name in canonical DNS wire format (all lowercase) The canonical form of the name.



wild
public Name wild(int n)(Code)
Generates a new Name with the first n labels replaced by a wildcard The wildcard name



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.