Java Doc for ProviderMgr.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.ProviderMgr

ProviderMgr
public class ProviderMgr (Code)
Contains some useful routines that are used in other classes.


Field Summary
final static  booleanCHECK_NAMES
    
final static  intLOG_DEBUG
    
final static  intLOG_ERROR
    
final static  intLOG_NONE
    
final static  intLOG_WARNING
    


Method Summary
public static  booleancheckBit(int value, int mask)
     Checks if any of specified bits is set.
public static  StringgetIpStr(byte[] ip)
     Creates the text representation of IPv4 address.
public static  intgetMatchingCount(String name1, String name2)
     Compares two labels and returns the matching count (number of the matching labels down from the root).
public static  StringgetParentName(String name)
     Returns the name of parent DNS zone for given zone.
public static  intgetRecordClassNumber(String str)
    
public static  intgetRecordTypeNumber(String str)
    
public static  booleannamesAreEqual(String name1, String name2)
     Compares two DNS names.
public static  StringnormalizeName(String zone)
     Converts all letters to lower case and adds "." to the end of zone name if necessary.
public static  intparse16Int(byte[] buffer, int idx)
     Parses 16 bit integer.
public static  longparse32Int(byte[] buffer, int idx)
     Parses 32 bit integer.
public static  intparse8Int(byte[] buffer, int idx)
     Parses 8 bit integer.
public static  intparseCharString(byte[] mesBytes, int startIdx, StringBuffer result)
     Parses the string of characters preceded with length octet.
public static  byte[]parseIpStr(String ipStr)
     Parses the text representation of IPv4 address.
Parameters:
  ipStr - string in n.n.n.n format.
public static  intparseName(byte[] mesBytes, int startIdx, StringBuffer result)
     Parses the domain name from the sequence of bytes.
public static  intsetBit(int value, int mask, boolean bit)
     Sets or drops specific bit(s) of the given number.
public static  intwrite16Int(int value, byte[] buffer, int startIdx)
    
public static  intwrite32Int(long value, byte[] buffer, int startIdx)
    
public static  intwriteCharString(String value, byte[] buffer, int startIdx)
     Writes character string preceded with length octet.
public static  intwriteName(String name, byte[] buffer, int startIdx)
     Parses the given domain name and converts it into length label length label ...

Field Detail
CHECK_NAMES
final static boolean CHECK_NAMES(Code)



LOG_DEBUG
final static int LOG_DEBUG(Code)



LOG_ERROR
final static int LOG_ERROR(Code)



LOG_NONE
final static int LOG_NONE(Code)



LOG_WARNING
final static int LOG_WARNING(Code)





Method Detail
checkBit
public static boolean checkBit(int value, int mask)(Code)
Checks if any of specified bits is set.
Parameters:
  value - the number to look at
Parameters:
  mask - a bit mask true of false



getIpStr
public static String getIpStr(byte[] ip)(Code)
Creates the text representation of IPv4 address.
Parameters:
  ip - the first four bytes should contain an IPv4 address string in n.n.n.n format
throws:
  java.lang.IllegalArgumentException - if given array has the length less than four



getMatchingCount
public static int getMatchingCount(String name1, String name2)(Code)
Compares two labels and returns the matching count (number of the matching labels down from the root).
Parameters:
  name1 - first name
Parameters:
  name2 - second name number of equal labels from the root to leaves



getParentName
public static String getParentName(String name)(Code)
Returns the name of parent DNS zone for given zone.
Parameters:
  name - the current DNS zone name the name of the parent



getRecordClassNumber
public static int getRecordClassNumber(String str)(Code)

Parameters:
  str - string name of the DNS record class integer number for the class; -1 if not found



getRecordTypeNumber
public static int getRecordTypeNumber(String str)(Code)

Parameters:
  str - string name of the DNS record type integer number for the type; -1 if not found



namesAreEqual
public static boolean namesAreEqual(String name1, String name2)(Code)
Compares two DNS names.
  1. Case insensitive
  2. Appends "." to the end of the name if necessary before comparison

Parameters:
  name1 - name1
Parameters:
  name2 - name2 true if names are equal; falseotherwise



normalizeName
public static String normalizeName(String zone)(Code)
Converts all letters to lower case and adds "." to the end of zone name if necessary.
Parameters:
  zone - zone name expanded zone name



parse16Int
public static int parse16Int(byte[] buffer, int idx)(Code)
Parses 16 bit integer. Buffer index should be updated manually after call to this method.
Parameters:
  buffer - sequence of bytes
Parameters:
  startIdx - the index to start at parsed integer value



parse32Int
public static long parse32Int(byte[] buffer, int idx)(Code)
Parses 32 bit integer. Buffer index should be updated manually after call to this method.
Parameters:
  buffer - sequence of bytes
Parameters:
  startIdx - the index to start at parsed integer value



parse8Int
public static int parse8Int(byte[] buffer, int idx)(Code)
Parses 8 bit integer. Buffer index should be updated manually after call to this method.
Parameters:
  buffer - sequence of bytes
Parameters:
  startIdx - the index to start at parsed integer value



parseCharString
public static int parseCharString(byte[] mesBytes, int startIdx, StringBuffer result)(Code)
Parses the string of characters preceded with length octet.
Parameters:
  mesBytes - message bytes
Parameters:
  startIdx - the index to start parsing from
Parameters:
  result - string buffer to write the result too updated index



parseIpStr
public static byte[] parseIpStr(String ipStr)(Code)
Parses the text representation of IPv4 address.
Parameters:
  ipStr - string in n.n.n.n format. four bytes with parsed IP address
throws:
  java.lang.NullPointerException - if ipStr is null
throws:
  java.lang.IllegalArgumentException - if given string is not in appropriate format



parseName
public static int parseName(byte[] mesBytes, int startIdx, StringBuffer result) throws DomainProtocolException(Code)
Parses the domain name from the sequence of bytes.
Parameters:
  mesBytes - byte representation of the message
Parameters:
  startIdx - the position to start the parsing at
Parameters:
  result - the string buffer to store parsed strings into updated index of mesBytes array
throws:
  DomainProtocolException - if something went wrong



setBit
public static int setBit(int value, int mask, boolean bit)(Code)
Sets or drops specific bit(s) of the given number.
Parameters:
  value - target integer value
Parameters:
  mask - specifies bit(s) position(s)
Parameters:
  bit - set if true, drop if false updated value



write16Int
public static int write16Int(int value, byte[] buffer, int startIdx)(Code)
Writes a 16-bit integer value into the buffer, high byte first
Parameters:
  value - the value to write, first 16 bits will be taken
Parameters:
  buffer - the buffer to write into
Parameters:
  startIdx - a starting index updated index



write32Int
public static int write32Int(long value, byte[] buffer, int startIdx)(Code)
Writes a 32-bit integer value into the buffer, highest byte first
Parameters:
  value - the value to write, first 32 bits will be taken
Parameters:
  buffer - the buffer to write into
Parameters:
  startIdx - a starting index updated index



writeCharString
public static int writeCharString(String value, byte[] buffer, int startIdx) throws DomainProtocolException(Code)
Writes character string preceded with length octet.
Parameters:
  value - string value to write
Parameters:
  buffer - buffer to write to
Parameters:
  startIdx - index in buffer to start from updated index
throws:
  NullPointerException - if some argument is null
throws:
  DomainProtocolException - if string is too long



writeName
public static int writeName(String name, byte[] buffer, int startIdx) throws DomainProtocolException(Code)
Parses the given domain name and converts it into length label length label ... length label sequence of bytes.
Parameters:
  name - a domain name, a dot-separated list of labels
Parameters:
  buffer - target buffer in which the result will be written
Parameters:
  startIdx - the index to start at while writing to the buffer array updated index of the buffer array



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.