Java Doc for StreamMessageImpl.java in  » Workflow-Engines » Dalma » dalma » endpoints » jms » impl » 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 » Workflow Engines » Dalma » dalma.endpoints.jms.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


dalma.endpoints.jms.impl.StreamMessageImpl

StreamMessageImpl
public class StreamMessageImpl extends MessageImpl implements StreamMessage(Code)

author:
   Kohsuke Kawaguchi


Field Summary
 booleanreadOnlyMode
     A StreamMessage can be in two modes.

Constructor Summary
public  StreamMessageImpl()
    

Method Summary
public  voidclearBody()
    
public  booleanreadBoolean()
     Reads a boolean from the stream message.
public  bytereadByte()
     Reads a byte value from the stream message.
public  intreadBytes(byte[] value)
     Reads a byte array field from the stream message into the specified byte[] object (the read buffer).

To read the field value, readBytes should be successively called until it returns a value less than the length of the read buffer. The value of the bytes in the buffer following the last byte read is undefined.

If readBytes returns a value equal to the length of the buffer, a subsequent readBytes call must be made.

public  charreadChar()
     Reads a Unicode character value from the stream message.
public  doublereadDouble()
     Reads a double from the stream message.
public  floatreadFloat()
     Reads a float from the stream message.
public  intreadInt()
     Reads a 32-bit integer from the stream message.
public  longreadLong()
     Reads a 64-bit integer from the stream message.
public  ObjectreadObject()
     Reads an object from the stream message.
public  shortreadShort()
     Reads a 16-bit integer from the stream message.
public  StringreadString()
     Reads a String from the stream message.
public  voidreset()
     Puts the message body in read-only mode and repositions the stream of bytes to the beginning.
public  StreamMessageImplwrap(StreamMessage s)
    
public  voidwriteBoolean(boolean value)
     Writes a boolean to the stream message.
public  voidwriteByte(byte value)
     Writes a byte to the stream message.
public  voidwriteBytes(byte[] value)
     Writes a byte array field to the stream message.

The byte array value is written to the message as a byte array field.

public  voidwriteBytes(byte[] value, int offset, int length)
     Writes a portion of a byte array as a byte array field to the stream message.

The a portion of the byte array value is written to the message as a byte array field.

public  voidwriteChar(char value)
     Writes a char to the stream message.
public  voidwriteDouble(double value)
     Writes a double to the stream message.
public  voidwriteFloat(float value)
     Writes a float to the stream message.
public  voidwriteInt(int value)
     Writes an int to the stream message.
public  voidwriteLong(long value)
     Writes a long to the stream message.
public  voidwriteObject(Object value)
     Writes an object to the stream message.
public  voidwriteShort(short value)
     Writes a short to the stream message.
public  voidwriteString(String value)
     Writes a String to the stream message.
public  voidwriteTo(StreamMessage d)
    

Field Detail
readOnlyMode
boolean readOnlyMode(Code)
A StreamMessage can be in two modes. read-only/write-only




Constructor Detail
StreamMessageImpl
public StreamMessageImpl()(Code)




Method Detail
clearBody
public void clearBody() throws JMSException(Code)



readBoolean
public boolean readBoolean() throws JMSException(Code)
Reads a boolean from the stream message. the boolean value read
throws:
  JMSException - if the JMS provider fails to read the messagedue to some internal error.
throws:
  MessageEOFException - if unexpected end of message stream hasbeen reached.
throws:
  MessageFormatException - if this type conversion is invalid.
throws:
  MessageNotReadableException - if the message is in write-onlymode.



readByte
public byte readByte() throws JMSException(Code)
Reads a byte value from the stream message. the next byte from the stream message as a 8-bitbyte
throws:
  JMSException - if the JMS provider fails to read the messagedue to some internal error.
throws:
  MessageEOFException - if unexpected end of message stream hasbeen reached.
throws:
  MessageFormatException - if this type conversion is invalid.
throws:
  MessageNotReadableException - if the message is in write-onlymode.



readBytes
public int readBytes(byte[] value) throws JMSException(Code)
Reads a byte array field from the stream message into the specified byte[] object (the read buffer).

To read the field value, readBytes should be successively called until it returns a value less than the length of the read buffer. The value of the bytes in the buffer following the last byte read is undefined.

If readBytes returns a value equal to the length of the buffer, a subsequent readBytes call must be made. If there are no more bytes to be read, this call returns -1.

If the byte array field value is null, readBytes returns -1.

If the byte array field value is empty, readBytes returns 0.

Once the first readBytes call on a byte[] field value has been made, the full value of the field must be read before it is valid to read the next field. An attempt to read the next field before that has been done will throw a MessageFormatException.

To read the byte field value into a new byte[] object, use the readObject method.
Parameters:
  value - the buffer into which the data is read the total number of bytes read into the buffer, or -1 ifthere is no more data because the end of the byte field has beenreached
throws:
  JMSException - if the JMS provider fails to read the messagedue to some internal error.
throws:
  MessageEOFException - if unexpected end of message stream hasbeen reached.
throws:
  MessageFormatException - if this type conversion is invalid.
throws:
  MessageNotReadableException - if the message is in write-onlymode.
See Also:   StreamMessageImpl.readObject()




readChar
public char readChar() throws JMSException(Code)
Reads a Unicode character value from the stream message. a Unicode character from the stream message
throws:
  JMSException - if the JMS provider fails to read the messagedue to some internal error.
throws:
  MessageEOFException - if unexpected end of message stream hasbeen reached.
throws:
  MessageFormatException - if this type conversion is invalid
throws:
  MessageNotReadableException - if the message is in write-onlymode.



readDouble
public double readDouble() throws JMSException(Code)
Reads a double from the stream message. a double value from the stream message
throws:
  JMSException - if the JMS provider fails to read the messagedue to some internal error.
throws:
  MessageEOFException - if unexpected end of message stream hasbeen reached.
throws:
  MessageFormatException - if this type conversion is invalid.
throws:
  MessageNotReadableException - if the message is in write-onlymode.



readFloat
public float readFloat() throws JMSException(Code)
Reads a float from the stream message. a float value from the stream message
throws:
  JMSException - if the JMS provider fails to read the messagedue to some internal error.
throws:
  MessageEOFException - if unexpected end of message stream hasbeen reached.
throws:
  MessageFormatException - if this type conversion is invalid.
throws:
  MessageNotReadableException - if the message is in write-onlymode.



readInt
public int readInt() throws JMSException(Code)
Reads a 32-bit integer from the stream message. a 32-bit integer value from the stream message, interpretedas an int
throws:
  JMSException - if the JMS provider fails to read the messagedue to some internal error.
throws:
  MessageEOFException - if unexpected end of message stream hasbeen reached.
throws:
  MessageFormatException - if this type conversion is invalid.
throws:
  MessageNotReadableException - if the message is in write-onlymode.



readLong
public long readLong() throws JMSException(Code)
Reads a 64-bit integer from the stream message. a 64-bit integer value from the stream message, interpreted asa long
throws:
  JMSException - if the JMS provider fails to read the messagedue to some internal error.
throws:
  MessageEOFException - if unexpected end of message stream hasbeen reached.
throws:
  MessageFormatException - if this type conversion is invalid.
throws:
  MessageNotReadableException - if the message is in write-onlymode.



readObject
public Object readObject() throws JMSException(Code)
Reads an object from the stream message.

This method can be used to return, in objectified format, an object in the Java programming language ("Java object") that has been written to the stream with the equivalent writeObject method call, or its equivalent primitive writetype method.

Note that byte values are returned as byte[], not Byte[].

An attempt to call readObject to read a byte field value into a new byte[] object before the full value of the byte field has been read will throw a MessageFormatException. a Java object from the stream message, in objectifiedformat (for example, if the object was written as an int,an Integer is returned)
throws:
  JMSException - if the JMS provider fails to read the messagedue to some internal error.
throws:
  MessageEOFException - if unexpected end of message stream hasbeen reached.
throws:
  MessageFormatException - if this type conversion is invalid.
throws:
  MessageNotReadableException - if the message is in write-onlymode.
See Also:   StreamMessageImpl.readBytes(byte[] value)




readShort
public short readShort() throws JMSException(Code)
Reads a 16-bit integer from the stream message. a 16-bit integer from the stream message
throws:
  JMSException - if the JMS provider fails to read the messagedue to some internal error.
throws:
  MessageEOFException - if unexpected end of message stream hasbeen reached.
throws:
  MessageFormatException - if this type conversion is invalid.
throws:
  MessageNotReadableException - if the message is in write-onlymode.



readString
public String readString() throws JMSException(Code)
Reads a String from the stream message. a Unicode string from the stream message
throws:
  JMSException - if the JMS provider fails to read the messagedue to some internal error.
throws:
  MessageEOFException - if unexpected end of message stream hasbeen reached.
throws:
  MessageFormatException - if this type conversion is invalid.
throws:
  MessageNotReadableException - if the message is in write-onlymode.



reset
public void reset() throws JMSException(Code)
Puts the message body in read-only mode and repositions the stream of bytes to the beginning.
throws:
  JMSException - if an internal error occurs



wrap
public StreamMessageImpl wrap(StreamMessage s) throws JMSException(Code)



writeBoolean
public void writeBoolean(boolean value) throws JMSException(Code)
Writes a boolean to the stream message. The value true is written as the value (byte)1; the value false is written as the value (byte)0.
Parameters:
  value - the boolean value to be written
throws:
  JMSException - if the JMS provider fails to write the messagedue to some internal error.
throws:
  MessageNotWriteableException - if the message is in read-onlymode.



writeByte
public void writeByte(byte value) throws JMSException(Code)
Writes a byte to the stream message.
Parameters:
  value - the byte value to be written
throws:
  JMSException - if the JMS provider fails to write the messagedue to some internal error.
throws:
  MessageNotWriteableException - if the message is in read-onlymode.



writeBytes
public void writeBytes(byte[] value) throws JMSException(Code)
Writes a byte array field to the stream message.

The byte array value is written to the message as a byte array field. Consecutively written byte array fields are treated as two distinct fields when the fields are read.
Parameters:
  value - the byte array value to be written
throws:
  JMSException - if the JMS provider fails to write the messagedue to some internal error.
throws:
  MessageNotWriteableException - if the message is in read-onlymode.




writeBytes
public void writeBytes(byte[] value, int offset, int length) throws JMSException(Code)
Writes a portion of a byte array as a byte array field to the stream message.

The a portion of the byte array value is written to the message as a byte array field. Consecutively written byte array fields are treated as two distinct fields when the fields are read.
Parameters:
  value - the byte array value to be written
Parameters:
  offset - the initial offset within the byte array
Parameters:
  length - the number of bytes to use
throws:
  JMSException - if the JMS provider fails to write the messagedue to some internal error.
throws:
  MessageNotWriteableException - if the message is in read-onlymode.




writeChar
public void writeChar(char value) throws JMSException(Code)
Writes a char to the stream message.
Parameters:
  value - the char value to be written
throws:
  JMSException - if the JMS provider fails to write the messagedue to some internal error.
throws:
  MessageNotWriteableException - if the message is in read-onlymode.



writeDouble
public void writeDouble(double value) throws JMSException(Code)
Writes a double to the stream message.
Parameters:
  value - the double value to be written
throws:
  JMSException - if the JMS provider fails to write the messagedue to some internal error.
throws:
  MessageNotWriteableException - if the message is in read-onlymode.



writeFloat
public void writeFloat(float value) throws JMSException(Code)
Writes a float to the stream message.
Parameters:
  value - the float value to be written
throws:
  JMSException - if the JMS provider fails to write the messagedue to some internal error.
throws:
  MessageNotWriteableException - if the message is in read-onlymode.



writeInt
public void writeInt(int value) throws JMSException(Code)
Writes an int to the stream message.
Parameters:
  value - the int value to be written
throws:
  JMSException - if the JMS provider fails to write the messagedue to some internal error.
throws:
  MessageNotWriteableException - if the message is in read-onlymode.



writeLong
public void writeLong(long value) throws JMSException(Code)
Writes a long to the stream message.
Parameters:
  value - the long value to be written
throws:
  JMSException - if the JMS provider fails to write the messagedue to some internal error.
throws:
  MessageNotWriteableException - if the message is in read-onlymode.



writeObject
public void writeObject(Object value) throws JMSException(Code)
Writes an object to the stream message.

This method works only for the objectified primitive object types (Integer, Double, Long ...), String objects, and byte arrays.
Parameters:
  value - the Java object to be written
throws:
  JMSException - if the JMS provider fails to write the messagedue to some internal error.
throws:
  MessageFormatException - if the object is invalid.
throws:
  MessageNotWriteableException - if the message is in read-onlymode.




writeShort
public void writeShort(short value) throws JMSException(Code)
Writes a short to the stream message.
Parameters:
  value - the short value to be written
throws:
  JMSException - if the JMS provider fails to write the messagedue to some internal error.
throws:
  MessageNotWriteableException - if the message is in read-onlymode.



writeString
public void writeString(String value) throws JMSException(Code)
Writes a String to the stream message.
Parameters:
  value - the String value to be written
throws:
  JMSException - if the JMS provider fails to write the messagedue to some internal error.
throws:
  MessageNotWriteableException - if the message is in read-onlymode.



writeTo
public void writeTo(StreamMessage d) throws JMSException(Code)



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.