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

Tokenizer
public class Tokenizer (Code)
Tokenizer is used to parse DNS records and zones from text format,
author:
   Brian Wellington
author:
   Bob Halley

Inner Class :public static class Token
Inner Class :class TokenizerException extends TextParseException

Field Summary
final public static  intCOMMENT
    
final public static  intEOF
    
final public static  intEOL
    
final public static  intIDENTIFIER
    
final public static  intQUOTED_STRING
    
final public static  intWHITESPACE
    

Constructor Summary
public  Tokenizer(InputStream is)
     Creates a Tokenizer from an arbitrary input stream.
public  Tokenizer(String s)
     Creates a Tokenizer from a string.
public  Tokenizer(File f)
     Creates a Tokenizer from a file.

Method Summary
public  voidclose()
     Closes any files opened by this tokenizer.
public  TextParseExceptionexception(String s)
     Creates an exception which includes the current state in the error message
Parameters:
  s - The error message to include.
protected  voidfinalize()
    
public  Tokenget(boolean wantWhitespace, boolean wantComment)
     Gets the next token from a tokenizer.
Parameters:
  wantWhitespace - If true, leading whitespace will be returned as atoken.
Parameters:
  wantComment - If true, comments are returned as tokens.
public  Tokenget()
     Gets the next token from a tokenizer, ignoring whitespace and comments.
public  InetAddressgetAddress(int family)
     Gets the next token from a tokenizer and converts it to an IP Address.
Parameters:
  family - The address family.
public  byte[]getBase64(boolean required)
     Gets the remaining string tokens until an EOL/EOF is seen, concatenates them together, and converts the base64 encoded data to a byte array.
Parameters:
  required - If true, an exception will be thrown if no strings remain;otherwise null be be returned.
public  byte[]getBase64()
     Gets the remaining string tokens until an EOL/EOF is seen, concatenates them together, and converts the base64 encoded data to a byte array.
public  voidgetEOL()
     Gets the next token from a tokenizer, which must be an EOL or EOF.
public  byte[]getHex(boolean required)
     Gets the remaining string tokens until an EOL/EOF is seen, concatenates them together, and converts the hex encoded data to a byte array.
Parameters:
  required - If true, an exception will be thrown if no strings remain;otherwise null be be returned.
public  byte[]getHex()
     Gets the remaining string tokens until an EOL/EOF is seen, concatenates them together, and converts the hex encoded data to a byte array.
public  StringgetIdentifier()
     Gets the next token from a tokenizer, ensures it is an unquoted string, and converts it to a string.
public  longgetLong()
     Gets the next token from a tokenizer and converts it to a long.
public  NamegetName(Name origin)
     Gets the next token from a tokenizer and converts it to a name.
Parameters:
  origin - The origin to append to relative names.
public  StringgetString()
     Gets the next token from a tokenizer and converts it to a string.
public  longgetTTL()
     Gets the next token from a tokenizer and parses it as a TTL.
public  longgetTTLLike()
     Gets the next token from a tokenizer and parses it as if it were a TTL.
public  intgetUInt16()
     Gets the next token from a tokenizer and converts it to an unsigned 16 bit integer.
public  longgetUInt32()
     Gets the next token from a tokenizer and converts it to an unsigned 32 bit integer.
public  intgetUInt8()
     Gets the next token from a tokenizer and converts it to an unsigned 8 bit integer.
public  voidunget()
     Returns a token to the stream, so that it will be returned by the next call to get().

Field Detail
COMMENT
final public static int COMMENT(Code)
A comment; only returned when wantComment is set



EOF
final public static int EOF(Code)
End of file



EOL
final public static int EOL(Code)
End of line



IDENTIFIER
final public static int IDENTIFIER(Code)
An identifier (unquoted string)



QUOTED_STRING
final public static int QUOTED_STRING(Code)
A quoted string



WHITESPACE
final public static int WHITESPACE(Code)
Whitespace; only returned when wantWhitespace is set




Constructor Detail
Tokenizer
public Tokenizer(InputStream is)(Code)
Creates a Tokenizer from an arbitrary input stream.
Parameters:
  is - The InputStream to tokenize.



Tokenizer
public Tokenizer(String s)(Code)
Creates a Tokenizer from a string.
Parameters:
  s - The String to tokenize.



Tokenizer
public Tokenizer(File f) throws FileNotFoundException(Code)
Creates a Tokenizer from a file.
Parameters:
  f - The File to tokenize.




Method Detail
close
public void close()(Code)
Closes any files opened by this tokenizer.



exception
public TextParseException exception(String s)(Code)
Creates an exception which includes the current state in the error message
Parameters:
  s - The error message to include. The exception to be thrown



finalize
protected void finalize()(Code)



get
public Token get(boolean wantWhitespace, boolean wantComment) throws IOException(Code)
Gets the next token from a tokenizer.
Parameters:
  wantWhitespace - If true, leading whitespace will be returned as atoken.
Parameters:
  wantComment - If true, comments are returned as tokens. The next token in the stream.
throws:
  TextParseException - The input was invalid.
throws:
  IOException - An I/O error occurred.



get
public Token get() throws IOException(Code)
Gets the next token from a tokenizer, ignoring whitespace and comments. The next token in the stream.
throws:
  TextParseException - The input was invalid.
throws:
  IOException - An I/O error occurred.



getAddress
public InetAddress getAddress(int family) throws IOException(Code)
Gets the next token from a tokenizer and converts it to an IP Address.
Parameters:
  family - The address family. The next token in the stream, as an InetAddress
throws:
  TextParseException - The input was invalid or not a valid address.
throws:
  IOException - An I/O error occurred.
See Also:   Address



getBase64
public byte[] getBase64(boolean required) throws IOException(Code)
Gets the remaining string tokens until an EOL/EOF is seen, concatenates them together, and converts the base64 encoded data to a byte array.
Parameters:
  required - If true, an exception will be thrown if no strings remain;otherwise null be be returned. The byte array containing the decoded strings, or null if therewere no strings to decode.
throws:
  TextParseException - The input was invalid.
throws:
  IOException - An I/O error occurred.



getBase64
public byte[] getBase64() throws IOException(Code)
Gets the remaining string tokens until an EOL/EOF is seen, concatenates them together, and converts the base64 encoded data to a byte array. The byte array containing the decoded strings, or null if therewere no strings to decode.
throws:
  TextParseException - The input was invalid.
throws:
  IOException - An I/O error occurred.



getEOL
public void getEOL() throws IOException(Code)
Gets the next token from a tokenizer, which must be an EOL or EOF.
throws:
  TextParseException - The input was invalid or not an EOL or EOF token.
throws:
  IOException - An I/O error occurred.



getHex
public byte[] getHex(boolean required) throws IOException(Code)
Gets the remaining string tokens until an EOL/EOF is seen, concatenates them together, and converts the hex encoded data to a byte array.
Parameters:
  required - If true, an exception will be thrown if no strings remain;otherwise null be be returned. The byte array containing the decoded strings, or null if therewere no strings to decode.
throws:
  TextParseException - The input was invalid.
throws:
  IOException - An I/O error occurred.



getHex
public byte[] getHex() throws IOException(Code)
Gets the remaining string tokens until an EOL/EOF is seen, concatenates them together, and converts the hex encoded data to a byte array. The byte array containing the decoded strings, or null if therewere no strings to decode.
throws:
  TextParseException - The input was invalid.
throws:
  IOException - An I/O error occurred.



getIdentifier
public String getIdentifier() throws IOException(Code)
Gets the next token from a tokenizer, ensures it is an unquoted string, and converts it to a string. The next token in the stream, as a string.
throws:
  TextParseException - The input was invalid or not an unquoted string.
throws:
  IOException - An I/O error occurred.



getLong
public long getLong() throws IOException(Code)
Gets the next token from a tokenizer and converts it to a long. The next token in the stream, as a long.
throws:
  TextParseException - The input was invalid or not a long.
throws:
  IOException - An I/O error occurred.



getName
public Name getName(Name origin) throws IOException(Code)
Gets the next token from a tokenizer and converts it to a name.
Parameters:
  origin - The origin to append to relative names. The next token in the stream, as a name.
throws:
  TextParseException - The input was invalid or not a valid name.
throws:
  IOException - An I/O error occurred.
throws:
  RelativeNameException - The parsed name was relative, even with theorigin.
See Also:   Name



getString
public String getString() throws IOException(Code)
Gets the next token from a tokenizer and converts it to a string. The next token in the stream, as a string.
throws:
  TextParseException - The input was invalid or not a string.
throws:
  IOException - An I/O error occurred.



getTTL
public long getTTL() throws IOException(Code)
Gets the next token from a tokenizer and parses it as a TTL. The next token in the stream, as an unsigned 32 bit integer.
throws:
  TextParseException - The input was not valid.
throws:
  IOException - An I/O error occurred.
See Also:   TTL



getTTLLike
public long getTTLLike() throws IOException(Code)
Gets the next token from a tokenizer and parses it as if it were a TTL. The next token in the stream, as an unsigned 32 bit integer.
throws:
  TextParseException - The input was not valid.
throws:
  IOException - An I/O error occurred.
See Also:   TTL



getUInt16
public int getUInt16() throws IOException(Code)
Gets the next token from a tokenizer and converts it to an unsigned 16 bit integer. The next token in the stream, as an unsigned 16 bit integer.
throws:
  TextParseException - The input was invalid or not an unsigned 16bit integer.
throws:
  IOException - An I/O error occurred.



getUInt32
public long getUInt32() throws IOException(Code)
Gets the next token from a tokenizer and converts it to an unsigned 32 bit integer. The next token in the stream, as an unsigned 32 bit integer.
throws:
  TextParseException - The input was invalid or not an unsigned 32bit integer.
throws:
  IOException - An I/O error occurred.



getUInt8
public int getUInt8() throws IOException(Code)
Gets the next token from a tokenizer and converts it to an unsigned 8 bit integer. The next token in the stream, as an unsigned 8 bit integer.
throws:
  TextParseException - The input was invalid or not an unsigned 8bit integer.
throws:
  IOException - An I/O error occurred.



unget
public void unget()(Code)
Returns a token to the stream, so that it will be returned by the next call to get().
throws:
  IllegalStateException - There are already ungotten tokens.



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.