public class

SimpleMessageConverter102

extends SimpleMessageConverter
java.lang.Object
   ↳ org.springframework.jms.support.converter.SimpleMessageConverter
     ↳ org.springframework.jms.support.converter.SimpleMessageConverter102

This class is deprecated.
as of Spring 3.0, in favor of the JMS 1.1 based SimpleMessageConverter

Class Overview

A subclass of SimpleMessageConverter for the JMS 1.0.2 specification, not relying on JMS 1.1 methods like SimpleMessageConverter itself. This class can be used for JMS 1.0.2 providers, offering the same functionality as SimpleMessageConverter does for JMS 1.1 providers.

The only difference to the default SimpleMessageConverter is that BytesMessage is handled differently: namely, without using the getBodyLength() method which has been introduced in JMS 1.1 and is therefore not available on a JMS 1.0.2 provider.

See Also
  • javax.jms.BytesMessage#getBodyLength()

Summary

Constants
int BUFFER_SIZE
Public Constructors
SimpleMessageConverter102()
Protected Methods
byte[] extractByteArrayFromMessage(BytesMessage message)
Overrides superclass method to copy bytes from the message into a ByteArrayOutputStream, using a buffer, to avoid using the getBodyLength() method which has been introduced in JMS 1.1 and is therefore not available on a JMS 1.0.2 provider.
[Expand]
Inherited Methods
From class org.springframework.jms.support.converter.SimpleMessageConverter
From class java.lang.Object
From interface org.springframework.jms.support.converter.MessageConverter

Constants

public static final int BUFFER_SIZE

Constant Value: 4096 (0x00001000)

Public Constructors

public SimpleMessageConverter102 ()

Protected Methods

protected byte[] extractByteArrayFromMessage (BytesMessage message)

Overrides superclass method to copy bytes from the message into a ByteArrayOutputStream, using a buffer, to avoid using the getBodyLength() method which has been introduced in JMS 1.1 and is therefore not available on a JMS 1.0.2 provider.

Parameters
message the message to convert
Returns
  • the resulting byte array
Throws
JMSException
See Also
  • javax.jms.BytesMessage#getBodyLength()