Java Doc for HttpParser.java in  » Web-Server » Jigsaw » org » w3c » www » http » 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 » Web Server » Jigsaw » org.w3c.www.http 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.w3c.www.http.HttpParser

HttpParser
public class HttpParser (Code)
A private class to help with the parsing. Contains only some static method, helping to parse various byte buffers into Java object (Yes, I am still and again trying to reduce memory consumption).

I don't know wether this sucks or not. One hand I am sparing a tremedous amount of Strings creation, on the other end I am recoding a number of parsers that are available on String instances.





Method Summary
final public static  intcompare(byte b1, int o1, int l1, byte b2, int o2, int l2)
     Compare two byte arrays. I am not comfident about how the equality of byte arrays is performed by other means, sorry.
final public static  intcompare(byte b1, int o1, int l1, byte b2)
     Compare two byte arrays. Short-cut version of the above version.
Parameters:
  b1 - The first byte array.
Parameters:
  o1 - The offset of the bytes to compare.
Parameters:
  l1 - The number of bytes to compare.
Parameters:
  b2 - What to compare against.
protected static  voiderror(String mth, String msg)
     Emit an error.
final public static  intnextItem(byte buf, ParseState ps)
     Parse list of items, taking care of quotes and optional LWS.
public static  longparseDate(byte buf, ParseState ps)
     Parse the given byte array as an HTTP compliant date.
Parameters:
  buf - The byte buffer to parse.
Parameters:
  sp - The current parsing state.
public static  longparseDateOrDeltaSeconds(byte buf, ParseState ps, long relto)
     Parse a date as either a delta-second value, or a date.
public static  longparseDateOrDeltaSeconds(byte buf, ParseState ps)
    
public static  longparseDeltaSecond(byte buf, ParseState ps)
     Parse a delta-second value.
final public static  intparseInt(byte buf, int radix, ParseState ps)
     Parse an integer, and return an updated pointer.
final public static  intparseInt(byte buf, ParseState ps)
    
final public static  longparseLong(byte buf, int radix, ParseState ps)
     Parse an integer, and return an updated pointer.
final public static  longparseLong(byte buf, ParseState ps)
    
public static  intparseMonth(byte buf, ParseState ps)
    
public static  doubleparseQuality(byte buf, ParseState ps)
    
final public static  intskipSpaces(byte buf, ParseState ps)
     Skip leading LWS, not including CR LF. Update the input offset, after any leading space.
Parameters:
  buf - The buffer to be parsed.
Parameters:
  ptr - The buffer pointer to be updated on return.
public static  booleanunquote(byte buf, ParseState ps)
    



Method Detail
compare
final public static int compare(byte b1, int o1, int l1, byte b2, int o2, int l2)(Code)
Compare two byte arrays. I am not comfident about how the equality of byte arrays is performed by other means, sorry.
Parameters:
  b1 - The first byte array.
Parameters:
  o1 - The offset of the bytes to compare.
Parameters:
  l1 - The number of bytes to compare.
Parameters:
  b2 - What to compare against.
Parameters:
  o2 - The offset of the bytes to compare.
Parameters:
  l2 - The length of the bytes to compare. An integer, <0 if b1 is less than b2,0 if equals, >0otherwise.



compare
final public static int compare(byte b1, int o1, int l1, byte b2)(Code)
Compare two byte arrays. Short-cut version of the above version.
Parameters:
  b1 - The first byte array.
Parameters:
  o1 - The offset of the bytes to compare.
Parameters:
  l1 - The number of bytes to compare.
Parameters:
  b2 - What to compare against. An integer, <0 if b1 is less than b2,0 if equals, >0otherwise.



error
protected static void error(String mth, String msg) throws HttpInvalidValueException(Code)
Emit an error.
Parameters:
  mth - The method trigerring the error.
Parameters:
  msg - An associated message.
exception:
  HttpInvalidValueException - To indicate the error to caller.



nextItem
final public static int nextItem(byte buf, ParseState ps)(Code)
Parse list of items, taking care of quotes and optional LWS. The output offset points to the next element of the list.



parseDate
public static long parseDate(byte buf, ParseState ps)(Code)
Parse the given byte array as an HTTP compliant date.
Parameters:
  buf - The byte buffer to parse.
Parameters:
  sp - The current parsing state. A long giving the date as a number of milliseconds since epoch.



parseDateOrDeltaSeconds
public static long parseDateOrDeltaSeconds(byte buf, ParseState ps, long relto)(Code)
Parse a date as either a delta-second value, or a date. In case of delta seconds, we use the current time (except if one is provided), to compute the date. A date encoded as the number of millisconds since Java epoch.



parseDateOrDeltaSeconds
public static long parseDateOrDeltaSeconds(byte buf, ParseState ps)(Code)



parseDeltaSecond
public static long parseDeltaSecond(byte buf, ParseState ps)(Code)
Parse a delta-second value. A long giving the date at which to retry as a number ofmilliseconds since Java epoch.



parseInt
final public static int parseInt(byte buf, int radix, ParseState ps)(Code)
Parse an integer, and return an updated pointer.



parseInt
final public static int parseInt(byte buf, ParseState ps)(Code)



parseLong
final public static long parseLong(byte buf, int radix, ParseState ps)(Code)
Parse an integer, and return an updated pointer.



parseLong
final public static long parseLong(byte buf, ParseState ps)(Code)



parseMonth
public static int parseMonth(byte buf, ParseState ps)(Code)



parseQuality
public static double parseQuality(byte buf, ParseState ps)(Code)



skipSpaces
final public static int skipSpaces(byte buf, ParseState ps)(Code)
Skip leading LWS, not including CR LF. Update the input offset, after any leading space.
Parameters:
  buf - The buffer to be parsed.
Parameters:
  ptr - The buffer pointer to be updated on return. The potentially advanced buffer input offset.



unquote
public static boolean unquote(byte buf, ParseState ps)(Code)



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.