Skip navigation.
Downloads | Product Documentation | Support

# JmsBytesMessage.h File Reference

Describes a JmsBytesMessage handle. More...

`#include <JmsCommon.h>`
`#include <JmsSession.h>`
`#include <JmsMessage.h>`
`#include <JmsTypes.h>`

Go to the source code of this file.

## Typedefs
typedef JmsMessage | JmsBytesMessage
## Functions
int JMSENTRY | JmsSessionBytesMessageCreate (JmsSession *session, JmsBytesMessage **message, JMS64I flags)
int JMSENTRY | JmsBytesMessageGetBodyLength (JmsBytesMessage *message, JMS64I *length, JMS64I flags)
int JMSENTRY | JmsBytesMessageReadBoolean (JmsBytesMessage *message, int *value, JMS64I flags)
int JMSENTRY | JmsBytesMessageReadByte (JmsBytesMessage *message, unsigned char *value, JMS64I flags)
int JMSENTRY | JmsBytesMessageReadUnsignedByte (JmsBytesMessage *message, unsigned char *value, JMS64I flags)
int JMSENTRY | JmsBytesMessageReadShort (JmsBytesMessage *message, short *value, JMS64I flags)
int JMSENTRY | JmsBytesMessageReadUnsignedShort (JmsBytesMessage *message, unsigned short *value, JMS64I flags)
int JMSENTRY | JmsBytesMessageReadChar (JmsBytesMessage *message, short *value, JMS64I flags)
int JMSENTRY | JmsBytesMessageReadInt (JmsBytesMessage *message, JMS32I *value, JMS64I flags)
int JMSENTRY | JmsBytesMessageReadLong (JmsBytesMessage *message, JMS64I *value, JMS64I flags)
int JMSENTRY | JmsBytesMessageReadFloat (JmsBytesMessage *message, float *value, JMS64I flags)
int JMSENTRY | JmsBytesMessageReadDouble (JmsBytesMessage *message, double *value, JMS64I flags)
int JMSENTRY | JmsBytesMessageReadUTF (JmsBytesMessage *message, JmsString *value, JMS64I flags)
int JMSENTRY | JmsBytesMessageReadBytes (JmsBytesMessage *message, void *bytes, JMS32I *length, JMS64I flags)
int JMSENTRY | JmsBytesMessageWriteBoolean (JmsBytesMessage *message, int value, JMS64I flags)
int JMSENTRY | JmsBytesMessageWriteByte (JmsBytesMessage *message, unsigned char value, JMS64I flags)
int JMSENTRY | JmsBytesMessageWriteShort (JmsBytesMessage *message, short value, JMS64I flags)
int JMSENTRY | JmsBytesMessageWriteChar (JmsBytesMessage *message, short value, JMS64I flags)
int JMSENTRY | JmsBytesMessageWriteInt (JmsBytesMessage *message, JMS32I value, JMS64I flags)
int JMSENTRY | JmsBytesMessageWriteLong (JmsBytesMessage *message, JMS64I value, JMS64I flags)
int JMSENTRY | JmsBytesMessageWriteFloat (JmsBytesMessage *message, float value, JMS64I flags)
int JMSENTRY | JmsBytesMessageWriteDouble (JmsBytesMessage *message, double value, JMS64I flags)
int JMSENTRY | JmsBytesMessageWriteUTF (JmsBytesMessage *message, JmsString *value, JMS64I flags)
int JMSENTRY | JmsBytesMessageWriteBytes (JmsBytesMessage *message, void *value, int length, JMS64I flags)
int JMSENTRY | JmsBytesMessageReset (JmsBytesMessage *message, JMS64I flags)

## Detailed Description

Describes a JmsBytesMessage handle.

Author:
  Copyright (c) 2002, BEA Systems, Inc. This file describes the functions that can be performed on a JmsBytesMessage handle A JmsBytesMessage handle corresponds to javax.jms.BytesMessage

## Typedef Documentation

typedef JmsMessage JmsBytesMessage

| A bytes message handle that represents the class javax.jms.BytesMessage

## Function Documentation

int JMSENTRY JmsBytesMessageGetBodyLength | ( | JmsBytesMessage * | message,
|  | JMS64I * | length,
|  | JMS64I | flags
| ) |

  | Gets the body length of a bytes message Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  length | Must not be NULL. On success *length will contain the body length of the bytes message
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageReadBoolean | ( | JmsBytesMessage * | message,
|  | int * | value,
|  | JMS64I | flags
| ) |

  | Reads a boolean from the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | Must not be NULL. On success *value will contain the boolean value from the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageReadByte | ( | JmsBytesMessage * | message,
|  | unsigned char * | value,
|  | JMS64I | flags
| ) |

  | Reads a byte from the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | Must not be NULL. On success *value will contain the byte value from the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageReadBytes | ( | JmsBytesMessage * | message,
|  | void * | bytes,
|  | JMS32I * | length,
|  | JMS64I | flags
| ) |

  | Reads a byte array from the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  bytes | Must not be NULL. On success will be filled in with *length bytes from the bytes message stream
  length | *length must contain the number of bytes available to be written in bytes. On success, *length will contain the number of bytes written to bytes
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageReadChar | ( | JmsBytesMessage * | message,
|  | short * | value,
|  | JMS64I | flags
| ) |

  | Reads a two-byte java character from the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | Must not be NULL. On success *value will contain the two-byte java character value from the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageReadDouble | ( | JmsBytesMessage * | message,
|  | double * | value,
|  | JMS64I | flags
| ) |

  | Reads a double from the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | Must not be NULL. On success *value will contain the double value from the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageReadFloat | ( | JmsBytesMessage * | message,
|  | float * | value,
|  | JMS64I | flags
| ) |

  | Reads a float from the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | Must not be NULL. On success *value will contain the float value from the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageReadInt | ( | JmsBytesMessage * | message,
|  | JMS32I * | value,
|  | JMS64I | flags
| ) |

  | Reads an integer from the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | Must not be NULL. On success *value will contain the integer value from the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageReadLong | ( | JmsBytesMessage * | message,
|  | JMS64I * | value,
|  | JMS64I | flags
| ) |

  | Reads a long from the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | Must not be NULL. On success *value will contain the long value from the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageReadShort | ( | JmsBytesMessage * | message,
|  | short * | value,
|  | JMS64I | flags
| ) |

  | Reads a short from the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | Must not be NULL. On success *value will contain the short value from the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageReadUnsignedByte | ( | JmsBytesMessage * | message,
|  | unsigned char * | value,
|  | JMS64I | flags
| ) |

  | Reads an unsigned byte from the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | Must not be NULL. On success *value will contain the unsigned byte value from the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageReadUnsignedShort | ( | JmsBytesMessage * | message,
|  | unsigned short * | value,
|  | JMS64I | flags
| ) |

  | Reads an unsigned short from the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | Must not be NULL. On success *value will contain the unsigned short value from the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageReadUTF | ( | JmsBytesMessage * | message,
|  | JmsString * | value,
|  | JMS64I | flags
| ) |

  | Reads a UTF-8 encoded string from the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | Must not be NULL
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageReset | ( | JmsBytesMessage * | message,
|  | JMS64I | flags
| ) |

  | Resets the bytes message stream. Puts the message body in read-only mode and repositions the stream of bytes to the beginning. Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageWriteBoolean | ( | JmsBytesMessage * | message,
|  | int | value,
|  | JMS64I | flags
| ) |

  | Writes a boolean value to the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | The boolean value to write to the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageWriteByte | ( | JmsBytesMessage * | message,
|  | unsigned char | value,
|  | JMS64I | flags
| ) |

  | Writes a byte value to the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | The byte value to write to the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageWriteBytes | ( | JmsBytesMessage * | message,
|  | void * | value,
|  | int | length,
|  | JMS64I | flags
| ) |

  | Writes a byte array value to the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | The bytes to write to the bytes message stream
  length | The number of bytes to write
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageWriteChar | ( | JmsBytesMessage * | message,
|  | short | value,
|  | JMS64I | flags
| ) |

  | Writes a two byte java character value to the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | The two byte java character value to write to the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageWriteDouble | ( | JmsBytesMessage * | message,
|  | double | value,
|  | JMS64I | flags
| ) |

  | Writes a double value to the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | The double value to write to the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageWriteFloat | ( | JmsBytesMessage * | message,
|  | float | value,
|  | JMS64I | flags
| ) |

  | Writes a float value to the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | The float value to write to the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageWriteInt | ( | JmsBytesMessage * | message,
|  | JMS32I | value,
|  | JMS64I | flags
| ) |

  | Writes an integer value to the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | The integer value to write to the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageWriteLong | ( | JmsBytesMessage * | message,
|  | JMS64I | value,
|  | JMS64I | flags
| ) |

  | Writes a long value to the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | The long value to write to the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageWriteShort | ( | JmsBytesMessage * | message,
|  | short | value,
|  | JMS64I | flags
| ) |

  | Writes a short value to the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | The short value to write to the bytes message stream
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsBytesMessageWriteUTF | ( | JmsBytesMessage * | message,
|  | JmsString * | value,
|  | JMS64I | flags
| ) |

  | Writes a UTF-8 encoded string value to the bytes message stream Parameters:
  message | Must be a valid bytes message handle. May not be NULL
  value | May not be NULL. The UTF-8 encoded string value to write to the bytes message stream
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

int JMSENTRY JmsSessionBytesMessageCreate | ( | JmsSession * | session,
|  | JmsBytesMessage ** | message,
|  | JMS64I | flags
| ) |

  | Gets a bytes message handle from the given session Parameters:
  session | Must be a valid session handle. May not be NULL
  message | May not be NULL. On success *message will contain a valid JmsBytesMessage handle
  flags | Reserved for future use. Must be zero
Returns: JMS_NO_ERROR JMS_GOT_EXCEPTION JMS_INPUT_PARAM_ERROR JMS_MALLOC_ERROR JMS_JVM_ERROR

Copyright 1996,2008, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.