Java Doc for MicroBurlapInput.java in  » Web-Services » hessian » com » caucho » burlap » client » 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 Services » hessian » com.caucho.burlap.client 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.caucho.burlap.client.MicroBurlapInput

MicroBurlapInput
public class MicroBurlapInput (Code)
Input stream for Burlap requests, compatible with microedition Java. It only uses classes and types available to J2ME. In particular, it does not have any support for the <double> type.

MicroBurlapInput does not depend on any classes other than in J2ME, so it can be extracted independently into a smaller package.

MicroBurlapInput is unbuffered, so any client needs to provide its own buffering.

 InputStream is = ...; // from http connection
 MicroBurlapInput in = new MicroBurlapInput(is);
 String value;
 in.startReply();         // read reply header
 value = in.readString(); // read string value
 in.completeReply();      // read reply footer
 


Field Summary
protected  Datedate
    
protected  StringBufferentity
    
protected  Stringmethod
    
protected  intpeek
    
protected  booleanpeekTag
    
protected  Vectorrefs
    
protected  StringBuffersbuf
    
protected  CalendarutcCalendar
    

Constructor Summary
public  MicroBurlapInput(InputStream is)
     Creates a new Burlap input stream, initialized with an underlying input stream.
public  MicroBurlapInput()
     Creates an uninitialized Burlap input stream.

Method Summary
public  voidcompleteCall()
     Completes reading the call.
public  voidcompleteReply()
     Completes reading the reply.
protected  IOExceptionexpectBeginTag(String expect, String tag)
    
protected  voidexpectEndTag(String tag)
    
protected  voidexpectStartTag(String tag)
    
protected  IOExceptionexpectedChar(String expect, int actualChar)
    
public  StringgetMethod()
     Returns a call's method.
public  voidinit(InputStream is)
     Initialize the Burlap input stream with a new underlying stream.
protected  booleanisWhitespace(int ch)
    
protected  byte[]parseBytes()
     Parses a byte array.
protected  ByteArrayOutputStreamparseBytes(ByteArrayOutputStream bos)
     Parses a byte array.
protected  longparseDate(Calendar calendar)
     Parses a date value from the stream.
protected  intparseInt()
     Parses an integer value from the stream.
protected  longparseLong()
     Parses a long value from the stream.
protected  StringparseString()
     Parses a string value from the stream.
protected  StringBufferparseString(StringBuffer sbuf)
     Parses a string value from the stream.
protected  booleanparseTag()
     Parses a tag.
protected  intread()
    
public  booleanreadBoolean()
     Reads a boolean value from the input stream.
public  byte[]readBytes()
     Reads a byte array from the input stream.
protected  ObjectreadExtensionObject(Class expectedClass, String tag)
     Reads object unknown to MicroBurlapInput.
public  HashtablereadFault()
     Reads a fault.
public  intreadInt()
     Reads an integer value from the input stream.
public  intreadLength()
     Reads a length value from the input stream.
public  ObjectreadList(Class expectedClass, String type, int length)
     Reads a list object from the input stream.
public  longreadLocalDate()
     Reads a date value from the input stream.
public  longreadLong()
     Reads a long value from the input stream.
public  ObjectreadMap(Class expectedClass, String type)
     Reads an object from the input stream.
public  ObjectreadObject(Class expectedClass)
     Reads an arbitrary object the input stream.
public  BurlapRemotereadRemote()
     Reads a remote value from the input stream.
public  ObjectreadReply(Class expectedClass)
     Reads a reply as an object.
public  StringreadString()
     Reads a string value from the input stream.

The two valid possibilities are either a <null> or a <string>.

public  StringreadType()
     Reads a type value from the input stream.
public  longreadUTCDate()
     Reads a date value from the input stream.
public  ObjectresolveRemote(String type, String url)
     Resolves a remote object.
protected  intskipWhitespace()
    
public  voidstartCall()
    
public  booleanstartReply()
     Starts reading the reply.

A successful completion will have a single value.


Field Detail
date
protected Date date(Code)



entity
protected StringBuffer entity(Code)



method
protected String method(Code)



peek
protected int peek(Code)



peekTag
protected boolean peekTag(Code)



refs
protected Vector refs(Code)



sbuf
protected StringBuffer sbuf(Code)



utcCalendar
protected Calendar utcCalendar(Code)




Constructor Detail
MicroBurlapInput
public MicroBurlapInput(InputStream is)(Code)
Creates a new Burlap input stream, initialized with an underlying input stream.
Parameters:
  is - the underlying input stream.



MicroBurlapInput
public MicroBurlapInput()(Code)
Creates an uninitialized Burlap input stream.




Method Detail
completeCall
public void completeCall() throws IOException(Code)
Completes reading the call.
 </burlap:call>
 



completeReply
public void completeReply() throws IOException(Code)
Completes reading the reply.
 </burlap:reply>
 



expectBeginTag
protected IOException expectBeginTag(String expect, String tag)(Code)



expectEndTag
protected void expectEndTag(String tag) throws IOException(Code)



expectStartTag
protected void expectStartTag(String tag) throws IOException(Code)



expectedChar
protected IOException expectedChar(String expect, int actualChar)(Code)



getMethod
public String getMethod()(Code)
Returns a call's method.



init
public void init(InputStream is)(Code)
Initialize the Burlap input stream with a new underlying stream. Applications can use init(InputStream) to reuse MicroBurlapInput to save garbage collection.



isWhitespace
protected boolean isWhitespace(int ch) throws IOException(Code)



parseBytes
protected byte[] parseBytes() throws IOException(Code)
Parses a byte array.



parseBytes
protected ByteArrayOutputStream parseBytes(ByteArrayOutputStream bos) throws IOException(Code)
Parses a byte array.



parseDate
protected long parseDate(Calendar calendar) throws IOException(Code)
Parses a date value from the stream.



parseInt
protected int parseInt() throws IOException(Code)
Parses an integer value from the stream.



parseLong
protected long parseLong() throws IOException(Code)
Parses a long value from the stream.



parseString
protected String parseString() throws IOException(Code)
Parses a string value from the stream. string buffer is used for the result.



parseString
protected StringBuffer parseString(StringBuffer sbuf) throws IOException(Code)
Parses a string value from the stream. The burlap object's string buffer is used for the result.



parseTag
protected boolean parseTag() throws IOException(Code)
Parses a tag. Returns true if it's a start tag.



read
protected int read() throws IOException(Code)



readBoolean
public boolean readBoolean() throws IOException(Code)
Reads a boolean value from the input stream.



readBytes
public byte[] readBytes() throws IOException(Code)
Reads a byte array from the input stream.

The two valid possibilities are either a <null> or a <base64>.




readExtensionObject
protected Object readExtensionObject(Class expectedClass, String tag) throws IOException(Code)
Reads object unknown to MicroBurlapInput.



readFault
public Hashtable readFault() throws IOException(Code)
Reads a fault.



readInt
public int readInt() throws IOException(Code)
Reads an integer value from the input stream.



readLength
public int readLength() throws IOException(Code)
Reads a length value from the input stream. If the length isn't specified, returns -1.
 <length>integer</length>
 



readList
public Object readList(Class expectedClass, String type, int length) throws IOException(Code)
Reads a list object from the input stream.
Parameters:
  expectedClass - the calling routine's expected class
Parameters:
  type - the type from the stream
Parameters:
  length - the expected length, -1 for unspecified length



readLocalDate
public long readLocalDate() throws IOException(Code)
Reads a date value from the input stream.



readLong
public long readLong() throws IOException(Code)
Reads a long value from the input stream.



readMap
public Object readMap(Class expectedClass, String type) throws IOException(Code)
Reads an object from the input stream.
Parameters:
  expectedClass - the calling routine's expected class
Parameters:
  type - the type from the stream



readObject
public Object readObject(Class expectedClass) throws IOException(Code)
Reads an arbitrary object the input stream.



readRemote
public BurlapRemote readRemote() throws IOException(Code)
Reads a remote value from the input stream.



readReply
public Object readReply(Class expectedClass) throws Exception(Code)
Reads a reply as an object. If the reply has a fault, throws the exception.



readString
public String readString() throws IOException(Code)
Reads a string value from the input stream.

The two valid possibilities are either a <null> or a <string>. The string value is encoded in utf-8, and understands the basic XML escapes: "&123;", "<", ">", "'", """.

 <null></null>
 <string>a utf-8 encoded string</string>
 



readType
public String readType() throws IOException(Code)
Reads a type value from the input stream.
 <type>a utf-8 encoded string</type>
 



readUTCDate
public long readUTCDate() throws IOException(Code)
Reads a date value from the input stream.



resolveRemote
public Object resolveRemote(String type, String url) throws IOException(Code)
Resolves a remote object.



skipWhitespace
protected int skipWhitespace() throws IOException(Code)



startCall
public void startCall() throws IOException(Code)
Starts reading the call

A successful completion will have a single value:

 <burlap:call>
 <method>method</method>
 



startReply
public boolean startReply() throws IOException(Code)
Starts reading the reply.

A successful completion will have a single value. An unsuccessful one will have a fault:

 <burlap:reply>
 
true if success, false for fault.



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.