Java Doc for HessianInput.java in  » EJB-Server-resin-3.1.5 » hessian » com » caucho » hessian » io » 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 » EJB Server resin 3.1.5 » hessian » com.caucho.hessian.io 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.caucho.hessian.io.AbstractHessianInput
      com.caucho.hessian.io.HessianInput

All known Subclasses:   com.caucho.hessian.io.HessianSerializerInput,
HessianInput
public class HessianInput extends AbstractHessianInput (Code)
Input stream for Hessian requests.

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

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


Field Summary
protected  int_peek
    
protected  ArrayList_refs
    
protected  SerializerFactory_serializerFactory
    

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

Method Summary
public  intaddRef(Object ref)
     Adds a list/map reference.
public  voidclose()
    
protected  StringcodeName(int ch)
    
public  voidcompleteCall()
    
public  voidcompleteReply()
    
public  voidcompleteValueReply()
    
protected  IOExceptionerror(String message)
    
protected  IOExceptionexpect(String expect, int ch)
    
public  StringgetMethod()
    
public  ReadergetReader()
    
public  ThrowablegetReplyFault()
     Returns any reply fault.
public  SerializerFactorygetSerializerFactory()
     Gets the serializer factory.
public  voidinit(InputStream is)
     Initialize the hessian stream with the underlying input stream.
public  booleanisEnd()
     Returns true if this is the end of a list or a map.
 org.w3c.dom.NodeparseXML()
    
 intread(byte[] buffer, int offset, int length)
     Reads bytes from the underlying stream.
final  intread()
    
public  booleanreadBoolean()
    
public  intreadByte()
     Reads a byte from the stream.
public  byte[]readBytes()
    
public  intreadBytes(byte[] buffer, int offset, int length)
     Reads a byte array from the stream.
public  intreadCall()
    
public  intreadChar()
     Reads a byte from the stream.
public  doublereadDouble()
    
public  voidreadEnd()
     Reads the end byte.
public  floatreadFloat()
    
public  StringreadHeader()
     Reads a header, returning null if there are no headers.
public  InputStreamreadInputStream()
     Reads bytes based on an input stream.
public  intreadInt()
    
public  intreadLength()
    
public  voidreadListEnd()
     Reads the end byte.
public  intreadListStart()
     Reads the start of a list.
public  longreadLong()
    
public  voidreadMapEnd()
     Reads the end byte.
public  intreadMapStart()
     Reads the start of a list.
public  StringreadMethod()
    
public  org.w3c.dom.NodereadNode()
     Reads an XML node.
public  voidreadNull()
    
public  ObjectreadObject(Class cl)
     Reads an object from the input stream with an expected type.
public  ObjectreadObject()
     Reads an arbitrary object from the input stream when the type is unknown.
public  ObjectreadRef()
     Reads a reference.
public  ObjectreadRemote()
     Reads a remote object.
public  ObjectreadReply(Class expectedClass)
     Reads a reply as an object.
public  shortreadShort()
    
public  intreadString(char[] buffer, int offset, int length)
     Reads a byte array from the stream.
public  StringreadString()
    
public  StringreadType()
     Parses a type from the stream.
public  longreadUTCDate()
     Reads a date.
public  voidresetReferences()
     Resets the references for streaming.
public  ObjectresolveRemote(String type, String url)
     Resolves a remote object.
public  voidsetRef(int i, Object ref)
     Adds a list/map reference.
public  voidsetSerializerFactory(SerializerFactory factory)
     Sets the serializer factory.
public  voidskipOptionalCall()
    
public  voidstartCall()
     Starts reading the call, including the headers.
public  voidstartReply()
    

Field Detail
_peek
protected int _peek(Code)



_refs
protected ArrayList _refs(Code)



_serializerFactory
protected SerializerFactory _serializerFactory(Code)




Constructor Detail
HessianInput
public HessianInput()(Code)
Creates an uninitialized Hessian input stream.



HessianInput
public HessianInput(InputStream is)(Code)
Creates a new Hessian input stream, initialized with an underlying input stream.
Parameters:
  is - the underlying input stream.




Method Detail
addRef
public int addRef(Object ref)(Code)
Adds a list/map reference.



close
public void close()(Code)



codeName
protected String codeName(int ch)(Code)



completeCall
public void completeCall() throws IOException(Code)
Completes reading the call

A successful completion will have a single value:

 z
 



completeReply
public void completeReply() throws IOException(Code)
Completes reading the call

A successful completion will have a single value:

 z
 



completeValueReply
public void completeValueReply() throws IOException(Code)
Completes reading the call

A successful completion will have a single value:

 z
 



error
protected IOException error(String message)(Code)



expect
protected IOException expect(String expect, int ch)(Code)



getMethod
public String getMethod()(Code)
Returns the calls method



getReader
public Reader getReader()(Code)



getReplyFault
public Throwable getReplyFault()(Code)
Returns any reply fault.



getSerializerFactory
public SerializerFactory getSerializerFactory()(Code)
Gets the serializer factory.



init
public void init(InputStream is)(Code)
Initialize the hessian stream with the underlying input stream.



isEnd
public boolean isEnd() throws IOException(Code)
Returns true if this is the end of a list or a map.



parseXML
org.w3c.dom.Node parseXML() throws IOException(Code)



read
int read(byte[] buffer, int offset, int length) throws IOException(Code)
Reads bytes from the underlying stream.



read
final int read() throws IOException(Code)



readBoolean
public boolean readBoolean() throws IOException(Code)
Reads a boolean
 T
 F
 



readByte
public int readByte() throws IOException(Code)
Reads a byte from the stream.



readBytes
public byte[] readBytes() throws IOException(Code)
Reads a byte array
 B b16 b8 data value
 



readBytes
public int readBytes(byte[] buffer, int offset, int length) throws IOException(Code)
Reads a byte array from the stream.



readCall
public int readCall() throws IOException(Code)
Starts reading the call
 c major minor
 



readChar
public int readChar() throws IOException(Code)
Reads a byte from the stream.



readDouble
public double readDouble() throws IOException(Code)
Reads a double
 D b64 b56 b48 b40 b32 b24 b16 b8
 



readEnd
public void readEnd() throws IOException(Code)
Reads the end byte.



readFloat
public float readFloat() throws IOException(Code)
Reads a float
 D b64 b56 b48 b40 b32 b24 b16 b8
 



readHeader
public String readHeader() throws IOException(Code)
Reads a header, returning null if there are no headers.
 H b16 b8 value
 



readInputStream
public InputStream readInputStream() throws IOException(Code)
Reads bytes based on an input stream.



readInt
public int readInt() throws IOException(Code)
Reads an integer
 I b32 b24 b16 b8
 



readLength
public int readLength() throws IOException(Code)
Parses the length for an array
 l b32 b24 b16 b8
 



readListEnd
public void readListEnd() throws IOException(Code)
Reads the end byte.



readListStart
public int readListStart() throws IOException(Code)
Reads the start of a list.



readLong
public long readLong() throws IOException(Code)
Reads a long
 L b64 b56 b48 b40 b32 b24 b16 b8
 



readMapEnd
public void readMapEnd() throws IOException(Code)
Reads the end byte.



readMapStart
public int readMapStart() throws IOException(Code)
Reads the start of a list.



readMethod
public String readMethod() throws IOException(Code)
Starts reading the call

A successful completion will have a single value:

 m b16 b8 method
 



readNode
public org.w3c.dom.Node readNode() throws IOException(Code)
Reads an XML node.
 S b16 b8 string value
 



readNull
public void readNull() throws IOException(Code)
Reads a null
 N
 



readObject
public Object readObject(Class cl) throws IOException(Code)
Reads an object from the input stream with an expected type.



readObject
public Object readObject() throws IOException(Code)
Reads an arbitrary object from the input stream when the type is unknown.



readRef
public Object readRef() throws IOException(Code)
Reads a reference.



readRemote
public Object readRemote() throws IOException(Code)
Reads a remote object.



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



readShort
public short readShort() throws IOException(Code)
Reads a short
 I b32 b24 b16 b8
 



readString
public int readString(char[] buffer, int offset, int length) throws IOException(Code)
Reads a byte array from the stream.



readString
public String readString() throws IOException(Code)
Reads a string
 S b16 b8 string value
 



readType
public String readType() throws IOException(Code)
Parses a type from the stream.
 t b16 b8
 



readUTCDate
public long readUTCDate() throws IOException(Code)
Reads a date.
 T b64 b56 b48 b40 b32 b24 b16 b8
 



resetReferences
public void resetReferences()(Code)
Resets the references for streaming.



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



setRef
public void setRef(int i, Object ref)(Code)
Adds a list/map reference.



setSerializerFactory
public void setSerializerFactory(SerializerFactory factory)(Code)
Sets the serializer factory.



skipOptionalCall
public void skipOptionalCall() throws IOException(Code)
For backward compatibility with HessianSkeleton



startCall
public void startCall() throws IOException(Code)
Starts reading the call, including the headers.

The call expects the following protocol data

 c major minor
 m b16 b8 method
 



startReply
public void startReply() throws Throwable(Code)
Starts reading the reply

A successful completion will have a single value:

 r
 



Methods inherited from com.caucho.hessian.io.AbstractHessianInput
abstract public int addRef(Object obj) throws IOException(Code)(Java Doc)
public void close() throws IOException(Code)(Java Doc)
abstract public void completeCall() throws IOException(Code)(Java Doc)
abstract public void completeReply() throws IOException(Code)(Java Doc)
abstract public String getMethod()(Code)(Java Doc)
abstract public Reader getReader() throws IOException(Code)(Java Doc)
public HessianRemoteResolver getRemoteResolver()(Code)(Java Doc)
public void init(InputStream is)(Code)(Java Doc)
abstract public boolean isEnd() throws IOException(Code)(Java Doc)
abstract public boolean readBoolean() throws IOException(Code)(Java Doc)
abstract public byte[] readBytes() throws IOException(Code)(Java Doc)
abstract public int readCall() throws IOException(Code)(Java Doc)
abstract public double readDouble() throws IOException(Code)(Java Doc)
abstract public void readEnd() throws IOException(Code)(Java Doc)
abstract public String readHeader() throws IOException(Code)(Java Doc)
abstract public InputStream readInputStream() throws IOException(Code)(Java Doc)
abstract public int readInt() throws IOException(Code)(Java Doc)
abstract public int readLength() throws IOException(Code)(Java Doc)
abstract public void readListEnd() throws IOException(Code)(Java Doc)
abstract public int readListStart() throws IOException(Code)(Java Doc)
abstract public long readLong() throws IOException(Code)(Java Doc)
abstract public void readMapEnd() throws IOException(Code)(Java Doc)
abstract public int readMapStart() throws IOException(Code)(Java Doc)
abstract public String readMethod() throws IOException(Code)(Java Doc)
abstract public org.w3c.dom.Node readNode() throws IOException(Code)(Java Doc)
abstract public void readNull() throws IOException(Code)(Java Doc)
abstract public Object readObject(Class expectedClass) throws IOException(Code)(Java Doc)
abstract public Object readObject() throws IOException(Code)(Java Doc)
abstract public Object readRef() throws IOException(Code)(Java Doc)
abstract public Object readRemote() throws IOException(Code)(Java Doc)
abstract public Object readReply(Class expectedClass) throws Throwable(Code)(Java Doc)
abstract public String readString() throws IOException(Code)(Java Doc)
abstract public String readType() throws IOException(Code)(Java Doc)
abstract public long readUTCDate() throws IOException(Code)(Java Doc)
public void resetReferences()(Code)(Java Doc)
abstract public void setRef(int i, Object obj) throws IOException(Code)(Java Doc)
public void setRemoteResolver(HessianRemoteResolver resolver)(Code)(Java Doc)
public void setSerializerFactory(SerializerFactory ser)(Code)(Java Doc)
public void skipOptionalCall() throws IOException(Code)(Java Doc)
abstract public void startCall() throws IOException(Code)(Java Doc)
abstract public void startReply() throws Throwable(Code)(Java Doc)

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.