WebLogic Integration


com.bea.b2b.protocol.messaging
Class Attachment

java.lang.Object
  |
  +--com.bea.b2b.protocol.messaging.Attachment

public class Attachment
extends java.lang.Object
implements com.bea.b2b.protocol.messaging.MessagePart, PayloadPart

The Attachment class represents an attachment, which consists of binary content. An Attachment is a payload part of a business message and is used to exchange binary content between trading partners.

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.

Constructor Summary
Attachment()
          Constructs an Attachment.
Attachment(java.io.InputStream is)
          Constructs an Attachment using the specified input stream.
 
Method Summary
static byte[] base64Decode(byte[] b)
          Returns the result of base-64 decoding a byte array.
static byte[] base64Decode(java.lang.String s)
          Returns the result of base-64 decoding a string.
static java.lang.String base64Encode(byte[] ba)
          Returns the result of base-64 encoding a byte array.
static java.lang.String base64Encode(java.lang.String s)
          Returns the result of base-64 encoding a String.
 java.lang.String getHeader(java.lang.String key)
          Returns the value of the part header specified by "key".
 java.lang.String[] getHeaderKeys()
          Returns an array of the keys that may be used to retrieve all of the part headers.
 java.io.InputStream getInputStream()
          Gets the input stream for this message part.
 void setHeader(java.lang.String key, java.lang.String value)
          Sets a specific key/value pair into the part header
 void setInputStream(java.io.InputStream is)
          Sets the input stream for this message part.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Attachment

public Attachment()
Constructs an Attachment.

Attachment

public Attachment(java.io.InputStream is)
Constructs an Attachment using the specified input stream.

Parameters:
is - InputStream of the part.
Method Detail

getInputStream

public java.io.InputStream getInputStream()
Gets the input stream for this message part.

Returns:
InputStream - Input stream.

setInputStream

public void setInputStream(java.io.InputStream is)
Sets the input stream for this message part.

Parameters:
is - Input stream to specify.

base64Decode

public static byte[] base64Decode(byte[] b)
                           throws java.io.IOException
Returns the result of base-64 decoding a byte array.


base64Decode

public static byte[] base64Decode(java.lang.String s)
                           throws java.io.IOException
Returns the result of base-64 decoding a string.


base64Encode

public static java.lang.String base64Encode(byte[] ba)
Returns the result of base-64 encoding a byte array.


base64Encode

public static java.lang.String base64Encode(java.lang.String s)
Returns the result of base-64 encoding a String.


setHeader

public void setHeader(java.lang.String key,
                      java.lang.String value)
Sets a specific key/value pair into the part header
Specified by:
setHeader in interface com.bea.b2b.protocol.messaging.MessagePart


getHeader

public java.lang.String getHeader(java.lang.String key)
Returns the value of the part header specified by "key".
Specified by:
getHeader in interface com.bea.b2b.protocol.messaging.MessagePart


getHeaderKeys

public java.lang.String[] getHeaderKeys()
Returns an array of the keys that may be used to retrieve all of the part headers.
Specified by:
getHeaderKeys in interface com.bea.b2b.protocol.messaging.MessagePart


WebLogic Integration

WebLogic Integration (WLI)