# com.bea.data
RawData Interface

public interface RawData

This defines a Java interface for a potentially large piece of data (incoming message stored in the repository) which can be a process variable. The main purpose for using this interface (as opposed to a Java byte array) is to avoid having to read the entire message into memory to perform useful operations (XT transformations, forwarding, etc) on it.

## Nested Class Summary

`public static final class` | `RawData.Factory` Static factory class for creating new instances of RawData

## Method Summary

`public byte[]` | `byteValue`() Returns the data stored as a byte array
`public `InputStream`` | `newInputStream`() Returns more effecient access to the data stored in this object.
`public `String`` | `stringValue`() Serializes the Binary object into a String.
`public `String`` | `stringValue`(`String` enc) Serializes the data with a specified Java encoding.

## Method Detail

### byteValue() Method

    public byte[] byteValue()
         throws RawDataRuntimeException

Returns the data stored as a byte array

#### Returns

the bytes contained in this data object.

#### Exceptions

``RawDataRuntimeException``

### newInputStream() Method

    public InputStream newInputStream()
         throws IOException

Returns more effecient access to the data stored in this object.

#### Returns

an InputStream which contains the data.

#### Exceptions

``IOException``

### stringValue() Method

    public String stringValue()
         throws RawDataRuntimeException

Serializes the Binary object into a String. This uses the default encoding to convert the bytes to a String. May return a garbage string if the data is not encoded correctly.

#### Returns

the String representation of the Binary document.

#### Exceptions

``RawDataRuntimeException``

### stringValue(String) Method

    public String stringValue(String enc)
         throws UnsupportedEncodingException, RawDataRuntimeException

Serializes the data with a specified Java encoding.

#### Returns

the String representation of the Binary document.

#### Exceptions

``UnsupportedEncodingException``
``RawDataRuntimeException``