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

MicroBurlapOutput
public class MicroBurlapOutput (Code)
Output 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.

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

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

 OutputStream os = ...; // from http connection
 MicroBurlapOutput out = new MicroBurlapOutput(os);
 String value;
 out.startCall("hello");  // start hello call
 out.writeString("arg1"); // write a string argument
 out.completeCall();      // complete the call
 



Constructor Summary
public  MicroBurlapOutput(OutputStream os)
     Creates a new Burlap output stream, initialized with an underlying output stream.
public  MicroBurlapOutput()
     Creates an uninitialized Burlap output stream.

Method Summary
public static  charbase64encode(int d)
     Converts the digit to its base64 encoding.
public  voidcall(String method, Object[] args)
     Writes a complete method call.
public  voidcompleteCall()
    
public  voidinit(OutputStream os)
    
public  voidprint(String s)
     Prints a string as ascii to the stream.
public  voidprintBytes(byte[] data, int offset, int length)
     Prints a byte array to the stream, properly encoded in base64.
public  voidprintDate(Calendar calendar)
     Prints a date.
public  voidprintInt(int v)
     Prints an integer to the stream.
public  voidprintLong(long v)
     Prints a long to the stream.
public  voidprintString(String v)
     Prints a string to the stream, properly encoded.
public  voidstartCall(String method)
    
public  voidwriteBoolean(boolean value)
     Writes a boolean value to the stream.
public  voidwriteBytes(byte[] buffer, int offset, int length)
     Writes a byte array to the stream using base64 encoding.
public  voidwriteCustomObject(Object object)
     Applications which override this can do custom serialization.
public  voidwriteInt(int value)
     Writes an integer value to the stream.
public  voidwriteListBegin(int length, String type)
     Writes the list header to the stream.
public  voidwriteListEnd()
     Writes the tail of the list to the stream.
public  voidwriteLocalDate(long time)
     Writes a date to the stream using ISO8609.
public  voidwriteLong(long value)
     Writes a long value to the stream.
public  voidwriteMapBegin(String type)
     Writes the map header to the stream.
public  voidwriteMapEnd()
     Writes the tail of the map to the stream.
public  voidwriteNull()
     Writes a null value to the stream.
public  voidwriteObject(Object object)
     Writes a generic object.
public  voidwriteRef(int value)
     Writes a reference.
public  voidwriteRemote(String type, String url)
     Writes a remote object reference to the stream.
public  voidwriteString(String value)
     Writes a string value to the stream using UTF-8 encoding.
public  voidwriteUTCDate(long time)
     Writes a date to the stream using ISO8609.


Constructor Detail
MicroBurlapOutput
public MicroBurlapOutput(OutputStream os)(Code)
Creates a new Burlap output stream, initialized with an underlying output stream.
Parameters:
  os - the underlying output stream.



MicroBurlapOutput
public MicroBurlapOutput()(Code)
Creates an uninitialized Burlap output stream.




Method Detail
base64encode
public static char base64encode(int d)(Code)
Converts the digit to its base64 encoding.



call
public void call(String method, Object[] args) throws IOException(Code)
Writes a complete method call.



completeCall
public void completeCall() throws IOException(Code)
Writes the method call:
 </burlap:request>
 



init
public void init(OutputStream os)(Code)



print
public void print(String s) throws IOException(Code)
Prints a string as ascii to the stream. Used for tags, etc. that are known to the ascii.
Parameters:
  s - the ascii string to print.



printBytes
public void printBytes(byte[] data, int offset, int length) throws IOException(Code)
Prints a byte array to the stream, properly encoded in base64.
Parameters:
  data - the bytes to print.



printDate
public void printDate(Calendar calendar) throws IOException(Code)
Prints a date.
Parameters:
  date - the date to print.



printInt
public void printInt(int v) throws IOException(Code)
Prints an integer to the stream.
Parameters:
  v - the integer to print.



printLong
public void printLong(long v) throws IOException(Code)
Prints a long to the stream.
Parameters:
  v - the long to print.



printString
public void printString(String v) throws IOException(Code)
Prints a string to the stream, properly encoded.
Parameters:
  v - the string to print.



startCall
public void startCall(String method) throws IOException(Code)
Writes the method call:
 <burlap:request>
 <method>add</method>
 

Parameters:
  method - the method name to call.



writeBoolean
public void writeBoolean(boolean value) throws IOException(Code)
Writes a boolean value to the stream. The boolean will be written with the following syntax:
 <boolean>1</boolean>
 

Parameters:
  value - the boolean value to write.



writeBytes
public void writeBytes(byte[] buffer, int offset, int length) throws IOException(Code)
Writes a byte array to the stream using base64 encoding. The array will be written with the following syntax:
 <base64>dJmO==</base64>
 
If the value is null, it will be written as
 <null></null>
 

Parameters:
  value - the string value to write.



writeCustomObject
public void writeCustomObject(Object object) throws IOException(Code)
Applications which override this can do custom serialization.
Parameters:
  object - the object to write.



writeInt
public void writeInt(int value) throws IOException(Code)
Writes an integer value to the stream. The integer will be written with the following syntax:
 <int>123</int>
 

Parameters:
  value - the integer value to write.



writeListBegin
public void writeListBegin(int length, String type) throws IOException(Code)
Writes the list header to the stream. List writers will call writeListBegin followed by the list contents and then call writeListEnd.
 <list>
 <type>java.util.ArrayList</type>
 <length>3</length>
 <int>1</int>
 <int>2</int>
 <int>3</int>
 </list>
 



writeListEnd
public void writeListEnd() throws IOException(Code)
Writes the tail of the list to the stream.



writeLocalDate
public void writeLocalDate(long time) throws IOException(Code)
Writes a date to the stream using ISO8609.
 <date>19980508T095131Z</date>
 

Parameters:
  value - the date in milliseconds from the epoch in local timezone



writeLong
public void writeLong(long value) throws IOException(Code)
Writes a long value to the stream. The long will be written with the following syntax:
 <long>123</long>
 

Parameters:
  value - the long value to write.



writeMapBegin
public void writeMapBegin(String type) throws IOException(Code)
Writes the map header to the stream. Map writers will call writeMapBegin followed by the map contents and then call writeMapEnd.
 <map>
 <type>java.util.Hashtable</type>
 <string>a</string;<int>1</int>
 <string>b</string;<int>2</int>
 <string>c</string;<int>3</int>
 </map>
 



writeMapEnd
public void writeMapEnd() throws IOException(Code)
Writes the tail of the map to the stream.



writeNull
public void writeNull() throws IOException(Code)
Writes a null value to the stream. The null will be written with the following syntax
 <null></null>
 

Parameters:
  value - the string value to write.



writeObject
public void writeObject(Object object) throws IOException(Code)
Writes a generic object. writeObject understands the following types:
  • null
  • java.lang.String
  • java.lang.Boolean
  • java.lang.Integer
  • java.lang.Long
  • java.util.Date
  • byte[]
  • java.util.Vector
  • java.util.Hashtable
Unknown objects will call writeCustomObject.



writeRef
public void writeRef(int value) throws IOException(Code)
Writes a reference.
 <ref>123</ref>
 

Parameters:
  value - the integer value to write.



writeRemote
public void writeRemote(String type, String url) throws IOException(Code)
Writes a remote object reference to the stream. The type is the type of the remote interface.
 <remote>
 <type>test.account.Account</type>
 <string>http://caucho.com/foo;ejbid=bar</string>
 </remote>
 



writeString
public void writeString(String value) throws IOException(Code)
Writes a string value to the stream using UTF-8 encoding. The string will be written with the following syntax:
 <string>12.3e10</string>
 
If the value is null, it will be written as
 <null></null>
 

Parameters:
  value - the string value to write.



writeUTCDate
public void writeUTCDate(long time) throws IOException(Code)
Writes a date to the stream using ISO8609.
 <date>19980508T095131Z</date>
 

Parameters:
  value - the date in milliseconds from the epoch in UTC



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.