Java Doc for StringTokenizer.java in  » 6.0-JDK-Modules » j2me » gov » nist » core » 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 » 6.0 JDK Modules » j2me » gov.nist.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   gov.nist.core.StringTokenizer

All known Subclasses:   gov.nist.core.LexerCore,
StringTokenizer
public class StringTokenizer (Code)
Base string token splitter.
version:
   JAIN-SIP-1.1
version:
   This code is in the public domain.


Field Summary
protected  Stringbuffer
     Current buffer to be parsed.
 chardelimiter
     Current token delimiter.
protected  intptr
     Current offset int input buffer.
protected  intsavedPtr
     Saved pointer for peek operations.

Constructor Summary
public  StringTokenizer()
     Default constructor.
public  StringTokenizer(String buffer)
     Constructs a string tokenizer for input buffer.
public  StringTokenizer(String buffer, char delimiter)
     Constructs a string tokenizer for input buffer and specified field separator.

Method Summary
public  voidconsume()
     Advances the current pointer to the saved peek pointer to consume the characters that were pending parsing completion.
public  voidconsume(int k)
     Consume the specified number of characters from the input buffer.
public static  StringconvertNewLines(String s)
     According to the RFC 3261, section 7.3.1: Header fields can be extended over multiple lines by preceding each extra line with at least one SP or horizontal tab (HT).
public  StringgetLine()
     Gets the next line of text.
public  VectorgetLines()
     Gets a Vector of the buffer tokenized by lines.
public  chargetNextChar()
     Gets one character in the input buffer and consumes the character.
public  StringgetNextToken(char delim)
     Gets the next token from the buffer.
public static  StringgetSDPFieldName(String line)
     Gets the SDP field name of the line.
public  booleanhasMoreChars()
     Checks if more characters are available.
public static  booleanisAlpha(char ch)
     Checks if the character is an alphabetic character.
Parameters:
  ch - the character to be checked.
public static  booleanisDigit(char ch)
     Checks if the character is a numeric character.
Parameters:
  ch - the character to be checked.
public static  booleanisDigitString(String str)
     Checks if the string contains numeric characters only.
Parameters:
  str - the string to be checked.
public static  booleanisEscaped(String name, int index)
     Checks if the given symbol belongs to the escaped group.
public static  booleanisHexDigit(char ch)
     Checks if character is part of a hexadecimal number.
public static  booleanisQuotedPair(String name, int offset)
     Checks if the given sequence is quoted pair.
public static  booleanisValidChar(char ch)
     Checks if the given character is allowed in method/header/parameter name.
public  charlookAhead()
     Looks ahead one character in the input buffer without consuming the character.
public  charlookAhead(int k)
     Looks ahead a specified number of characters in the input buffer without consuming the character.
public  StringnextToken()
     Gets the next token.
public  StringpeekLine()
     Peeks at the next line without consuming the characters.

Field Detail
buffer
protected String buffer(Code)
Current buffer to be parsed.



delimiter
char delimiter(Code)
Current token delimiter.



ptr
protected int ptr(Code)
Current offset int input buffer.



savedPtr
protected int savedPtr(Code)
Saved pointer for peek operations.




Constructor Detail
StringTokenizer
public StringTokenizer()(Code)
Default constructor. Resets the buffer offset to 0 and the default newline delimiter.



StringTokenizer
public StringTokenizer(String buffer)(Code)
Constructs a string tokenizer for input buffer.
Parameters:
  buffer - the text to be parsed



StringTokenizer
public StringTokenizer(String buffer, char delimiter)(Code)
Constructs a string tokenizer for input buffer and specified field separator.
Parameters:
  buffer - the text to be parsed
Parameters:
  delimiter - the field separator character




Method Detail
consume
public void consume()(Code)
Advances the current pointer to the saved peek pointer to consume the characters that were pending parsing completion.



consume
public void consume(int k)(Code)
Consume the specified number of characters from the input buffer.
Parameters:
  k - the number of characters to advance thecurrent buffer offset



convertNewLines
public static String convertNewLines(String s)(Code)
According to the RFC 3261, section 7.3.1: Header fields can be extended over multiple lines by preceding each extra line with at least one SP or horizontal tab (HT). The line break and the whitespace at the beginning of the next line are treated as a single SP character. This function converts all pairs of newline+space/tab in the string 's' into signle spaces.
Parameters:
  s - string to handle. processed string.



getLine
public String getLine()(Code)
Gets the next line of text. characters up to the next newline



getLines
public Vector getLines()(Code)
Gets a Vector of the buffer tokenized by lines. vector of tokens



getNextChar
public char getNextChar() throws ParseException(Code)
Gets one character in the input buffer and consumes the character. the next character in the input buffer
exception:
  ParseException - if a parsing error occurs



getNextToken
public String getNextToken(char delim) throws ParseException(Code)
Gets the next token from the buffer.
Parameters:
  delim - the field separator the next textual token
exception:
  ParseException - if a parsing error occurs



getSDPFieldName
public static String getSDPFieldName(String line)(Code)
Gets the SDP field name of the line.
Parameters:
  line - the input buffer to be parsed the SDP field name



hasMoreChars
public boolean hasMoreChars()(Code)
Checks if more characters are available. true if more characters can be processed



isAlpha
public static boolean isAlpha(char ch)(Code)
Checks if the character is an alphabetic character.
Parameters:
  ch - the character to be checked. true if the character is alphabetic



isDigit
public static boolean isDigit(char ch)(Code)
Checks if the character is a numeric character.
Parameters:
  ch - the character to be checked. true if the character is a deciomal digit



isDigitString
public static boolean isDigitString(String str)(Code)
Checks if the string contains numeric characters only.
Parameters:
  str - the string to be checked. true if the string contains numeric characters only



isEscaped
public static boolean isEscaped(String name, int index)(Code)
Checks if the given symbol belongs to the escaped group. The character is escaped if it is satisfies the next ABNF (see RFC3261 p.220):
escaped = "%" HEXDIG HEXDIG

Parameters:
  name - the string to be parsed for escaped value
Parameters:
  index - shift inside parsed string true if string contains escaped value, false otherwise



isHexDigit
public static boolean isHexDigit(char ch)(Code)
Checks if character is part of a hexadecimal number.
Parameters:
  ch - character to be checked true if the character is a hex digit



isQuotedPair
public static boolean isQuotedPair(String name, int offset)(Code)
Checks if the given sequence is quoted pair.
Parameters:
  name - the string to be parsed for quoted pair
Parameters:
  offset - inside parsed string true if quoted pair is placed at name[offset], false otherwise



isValidChar
public static boolean isValidChar(char ch)(Code)
Checks if the given character is allowed in method/header/parameter name. The character is valid if it is: (1) a digit or (2) a letter, or (3) is one of the characters on the next list: -.!%*_+`'~
Parameters:
  ch - the character to check true if the character is valid, false otherwise



lookAhead
public char lookAhead() throws ParseException(Code)
Looks ahead one character in the input buffer without consuming the character. the next character in the input buffer
exception:
  ParseException - if a parsing error occurs



lookAhead
public char lookAhead(int k) throws ParseException(Code)
Looks ahead a specified number of characters in the input buffer without consuming the character.
Parameters:
  k - the number of characters to advance thecurrent buffer offset the requested character in the input buffer
exception:
  ParseException - if a parsing error occurs



nextToken
public String nextToken()(Code)
Gets the next token. the next token, not including the field separator



peekLine
public String peekLine()(Code)
Peeks at the next line without consuming the characters. the next line of text



Methods inherited from java.lang.Object
public boolean equals(Object obj)(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.