Java Doc for DNSName.java in  » Apache-Harmony-Java-SE » org-package » org » apache » harmony » jndi » provider » 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 » Apache Harmony Java SE » org package » org.apache.harmony.jndi.provider.dns 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.harmony.jndi.provider.dns.DNSName

DNSName
public class DNSName implements Name,Cloneable(Code)
Represents the name in Domain Name System. The most significant part is the rightmost part of string representation. TODO add escapes checking for name components (?)



Constructor Summary
public  DNSName()
     Constructs an empty DNS name.
 DNSName(Vector<String> compVect)
     Constructs new DNS name with given components.

Method Summary
public  Nameadd(int posn, String comp)
     Adds the given component to the list of components at the specified index.
public  Nameadd(String comp)
     Adds the given component to the end of the current name.
public  NameaddAll(int posn, Name name)
     Add given components to the current name.
public  NameaddAll(Name name)
     Add given components to the end of current name.
public  Objectclone()
     Returns clone of the current name.
public  intcompareTo(Object name)
     Compares the specified name with the current name.
static  booleancomponentIsOk(String comp)
     Checks if the given string is a correct DNS name component.
public  booleanendsWith(Name name)
     Checks if the current name ends with the given name.
public  Stringget(int posn)
    
public  Enumeration<String>getAll()
     Returns all components of the current name.
public  NamegetPrefix(int posn)
    
public  NamegetSuffix(int posn)
    
public  booleanisAbsolute()
    
public  booleanisEmpty()
    
public  Objectremove(int posn)
     Removes component with specified number.
public  intsize()
    
public  booleanstartsWith(Name name)
     Checks if the current name starts with the given name.
public  StringtoString()
     Returns the string representation of this DNS name.


Constructor Detail
DNSName
public DNSName()(Code)
Constructs an empty DNS name.



DNSName
DNSName(Vector<String> compVect)(Code)
Constructs new DNS name with given components.
Parameters:
  compVect - the vector of name components




Method Detail
add
public Name add(int posn, String comp) throws InvalidNameException(Code)
Adds the given component to the list of components at the specified index.
Parameters:
  posn - an index to insert at
Parameters:
  comp - the component to insert updated name (this object)
throws:
  InvalidNameException - if the given string can't be used as a DNS name component
throws:
  ArrayIndexOutOfBoundsException - if posn index is out of range
See Also:   javax.naming.Name.add(intjava.lang.String)



add
public Name add(String comp) throws InvalidNameException(Code)
Adds the given component to the end of the current name.
Parameters:
  comp - the component to insert updated name (this object)
throws:
  InvalidNameException - if the given string can't be used as a DNS name component
See Also:   javax.naming.Name.add(java.lang.String)



addAll
public Name addAll(int posn, Name name) throws InvalidNameException(Code)
Add given components to the current name. The order is preserved.
Parameters:
  posn - the index at which given components should be added
Parameters:
  name - components this name should be added this object
throws:
  InvalidNameException - if the name given is not an instance of DNSNameclass
See Also:   javax.naming.Name.addAll(intjavax.naming.Name)



addAll
public Name addAll(Name name) throws InvalidNameException(Code)
Add given components to the end of current name. The order is preserved.
Parameters:
  name - components this name should be added this object
throws:
  InvalidNameException - if the name given is not an instance of DNSNameclass
See Also:   javax.naming.Name.addAll(javax.naming.Name)



clone
public Object clone()(Code)
Returns clone of the current name.
See Also:   java.lang.Object.clone



compareTo
public int compareTo(Object name)(Code)
Compares the specified name with the current name. It checks all components beginning at the most significant one. The method compareToIgnoreCase of underlying String object will be used for the real comparison of components. If two names have different sizes and the longer name begins with the shorter name then the longer name will be "bigger" than shorter.
Parameters:
  name - the name to compare with negative number; zero or positive number
throws:
  ClassCastException - if the name has class other thanDNSName
throws:
  NullPointerException - if the name is null
See Also:   javax.naming.Name.compareTo(java.lang.Object)
See Also:   java.lang.String.compareToIgnoreCase(java.lang.String)



componentIsOk
static boolean componentIsOk(String comp)(Code)
Checks if the given string is a correct DNS name component.
Parameters:
  comp - the string component to check true or false



endsWith
public boolean endsWith(Name name)(Code)
Checks if the current name ends with the given name. Returns false if the given name is null or not an instance of DNSName class.
Parameters:
  name - the name to compare the end of the current message with true or false
See Also:   javax.naming.Name.endsWith(javax.naming.Name)



get
public String get(int posn)(Code)

Parameters:
  posn - index of the component to return name component at index posn
throws:
  ArrayIndexOutOfBoundsException - if posn index is out of range
See Also:   javax.naming.Name.get(int)



getAll
public Enumeration<String> getAll()(Code)
Returns all components of the current name. enumeration of strings
See Also:   javax.naming.Name.getAll



getPrefix
public Name getPrefix(int posn)(Code)

Parameters:
  posn - index to stop at a DNSName object that consists of components ofthe current name with indexes from 0 to and notincluding posn.
throws:
  ArrayIndexOutOfBoundsException - if posn index is out of range
See Also:   javax.naming.Name.getPrefix(int)



getSuffix
public Name getSuffix(int posn)(Code)

Parameters:
  posn - index to start at a DNSName object that consists of components ofthe current name with indexes from posn to and notincluding #size().
throws:
  ArrayIndexOutOfBoundsException - if posn index is out of range
See Also:   javax.naming.Name.getSuffix(int)



isAbsolute
public boolean isAbsolute()(Code)
true if this name is an absolute DNS name, i.e.starts with empty label



isEmpty
public boolean isEmpty()(Code)
true if this name is empty
See Also:   javax.naming.Name.isEmpty



remove
public Object remove(int posn) throws InvalidNameException(Code)
Removes component with specified number.
Parameters:
  posn - index of component to remove
throws:
  ArrayIndexOutOfBoundsException - if posn index is out of range
See Also:   javax.naming.Name.remove(int)



size
public int size()(Code)
size of this name
See Also:   javax.naming.Name.size



startsWith
public boolean startsWith(Name name)(Code)
Checks if the current name starts with the given name. Returns false if the given name is null or not an instance of DNSName class.
Parameters:
  name - the name to compare the beginning of the current message with true or false
See Also:   javax.naming.Name.startsWith(javax.naming.Name)



toString
public String toString()(Code)
Returns the string representation of this DNS name. DNS name in string form



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.