Compoze Software, Inc.

com.compoze.ebusiness
Class BinaryData

java.lang.Object
  |
  +--com.compoze.ebusiness.BinaryData
All Implemented Interfaces:
com.compoze.ejb.IPersistable, java.io.Serializable

public class BinaryData
extends java.lang.Object
implements java.io.Serializable, com.compoze.ejb.IPersistable

This class stores some binary data and its content type.

See Also:
Serialized Form

Constructor Summary
BinaryData()
          Constructor.
BinaryData(byte[] data)
          Constructor.
BinaryData(byte[] data, java.lang.String sContentType)
          Constructor.
 
Method Summary
 java.lang.String getContentType()
          Gets the content type of the data.
 byte[] getData()
          Gets the data.
 java.io.InputStream getInputStream()
          Gets an input stream to the data.
 void setContentType(java.lang.String sContentType)
          Sets the content type of the data.
 void setData(byte[] data)
          Sets the data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryData

public BinaryData()
Constructor. No data is stored and a default content type (application/octet-stream) is used.

BinaryData

public BinaryData(byte[] data)
Constructor. A default content type (application/octet-stream) is used.
Parameters:
data - the binary data

BinaryData

public BinaryData(byte[] data,
                  java.lang.String sContentType)
Constructor.
Parameters:
data - the binary data
sContentType - the content type of the data
Method Detail

getData

public byte[] getData()
Gets the data.
Returns:
the data

setData

public void setData(byte[] data)
Sets the data.
Parameters:
data - the data to set

setContentType

public void setContentType(java.lang.String sContentType)
Sets the content type of the data.
Parameters:
sContentType - the content type of the data

getContentType

public java.lang.String getContentType()
Gets the content type of the data.
Returns:
the content type of the data

getInputStream

public java.io.InputStream getInputStream()
Gets an input stream to the data.
Returns:
an input stream to the data (null for no data)

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.