org.springframework.jms.support.converter

## Class SimpleMessageConverter102

- java.lang.Object
- - org.springframework.jms.support.converter.SimpleMessageConverter
  - - org.springframework.jms.support.converter.SimpleMessageConverter102

- All Implemented Interfaces:
    MessageConverter

  Deprecated.
  as of Spring 3.0, in favor of the JMS 1.1 based `SimpleMessageConverter`

      @Deprecated
      public class SimpleMessageConverter102
      extends SimpleMessageConverter

  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.

  Since:
    1.1.1
  Author:
    Juergen Hoeller
  See Also:
    `BytesMessage.getBodyLength()`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `BUFFER_SIZE` Deprecated.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleMessageConverter102()` Deprecated.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected byte[]` | `extractByteArrayFromMessage(BytesMessage message)` Deprecated. 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.

    - ### Methods inherited from class org.springframework.jms.support.converter.SimpleMessageConverter

      `createMessageForByteArray, createMessageForMap, createMessageForSerializable, createMessageForString, extractMapFromMessage, extractSerializableFromMessage, extractStringFromMessage, fromMessage, toMessage`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### BUFFER_SIZE

          public static final int BUFFER_SIZE

      Deprecated.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SimpleMessageConverter102

          public SimpleMessageConverter102()

      Deprecated.

  - ### Method Detail

    - #### extractByteArrayFromMessage

          protected byte[] extractByteArrayFromMessage(BytesMessage message)
                                                throws JMSException

      Deprecated.
      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.
      Overrides:
        `extractByteArrayFromMessage` in class `SimpleMessageConverter`
      Parameters:
        `message` - the message to convert
      Returns:
        the resulting byte array
      Throws:
        `JMSException` - if thrown by JMS methods
      See Also:
        `BytesMessage.getBodyLength()`