Compoze Software, Inc.

com.compoze.util
Class InputStreamDataSource


java.lang.Object

  |

  +--com.compoze.util.InputStreamDataSource

All Implemented Interfaces:
javax.activation.DataSource

public class InputStreamDataSource
extends java.lang.Object
implements javax.activation.DataSource

This class implements a data source for strings.


Constructor Summary
InputStreamDataSource(java.io.InputStream is, java.lang.String sContentType, java.lang.String sName)
          Constructor.
 
Method Summary
 java.lang.String getContentType()
          Get the content-type of the data.
 java.io.InputStream getInputStream()
          Get an input stream to the data.
 java.lang.String getName()
          Get the name.
 java.io.OutputStream getOutputStream()
          Get an output stream to the data (not supported).
 void setContentType(java.lang.String sContentType)
          Set the content-type of the data.
 void setName(java.lang.String sName)
          Set the name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputStreamDataSource


public InputStreamDataSource(java.io.InputStream is,
                             java.lang.String sContentType,
                             java.lang.String sName)
Constructor.
Parameters:
is - the input stream to the data
sContentType -  
sName - the display name
Method Detail

getContentType


public java.lang.String getContentType()
Get the content-type of the data.
Specified by:
getContentType in interface javax.activation.DataSource
Returns:
the content-type of the data

setContentType


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

getName


public java.lang.String getName()
Get the name.
Specified by:
getName in interface javax.activation.DataSource
Returns:
the name

setName


public void setName(java.lang.String sName)
Set the name.
Parameters:
sName - the name

getInputStream


public java.io.InputStream getInputStream()
Get an input stream to the data.
Specified by:
getInputStream in interface javax.activation.DataSource
Returns:
an input stream to the data

getOutputStream


public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Get an output stream to the data (not supported).
Specified by:
getOutputStream in interface javax.activation.DataSource
Returns:
the output stream to the data
Throws:
java.io.IOException - always thrown because operation not supported

Compoze Software, Inc.

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