Open Business Objects for EDI
v3.5.2

com.americancoders.util
Class ByteArrayDataSource

java.lang.Object
  extended bycom.americancoders.util.ByteArrayDataSource
All Implemented Interfaces:
javax.activation.DataSource

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


Constructor Summary
ByteArrayDataSource(byte[] inData, java.lang.String inType)
           
ByteArrayDataSource(java.io.InputStream is, java.lang.String inType)
          Create a datasource from an input stream
ByteArrayDataSource(java.lang.String inData, java.lang.String inType)
           
 
Method Summary
 java.lang.String getContentType()
          taken from sun's exmaples
 byte[] getData()
          returns data in byte array
 java.io.InputStream getInputStream()
          taken from sun's exmaples
 java.lang.String getName()
          always returns edix12
 java.io.OutputStream getOutputStream()
          taken from sun's exmaples
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayDataSource

public ByteArrayDataSource(java.io.InputStream is,
                           java.lang.String inType)
Create a datasource from an input stream

Parameters:
is - InputStream
inType - String type (not used)

ByteArrayDataSource

public ByteArrayDataSource(byte[] inData,
                           java.lang.String inType)

ByteArrayDataSource

public ByteArrayDataSource(java.lang.String inData,
                           java.lang.String inType)
Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
taken from sun's exmaples

Specified by:
getInputStream in interface javax.activation.DataSource
Returns:
InputStream
Throws:
java.io.IOException - from sun examples

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
taken from sun's exmaples

Specified by:
getOutputStream in interface javax.activation.DataSource
Returns:
OutputStream
Throws:
java.io.IOException - from sun examples

getData

public byte[] getData()
returns data in byte array

Returns:
byte[]

getContentType

public java.lang.String getContentType()
taken from sun's exmaples

Specified by:
getContentType in interface javax.activation.DataSource
Returns:
String type

getName

public java.lang.String getName()
always returns edix12

Specified by:
getName in interface javax.activation.DataSource
Returns:
String constant "edix12"

Open Business Objects for EDI
v3.5.2


OBOE is a trademark or registered trademark of American Coders, Ltd. in the US and other countries.
Copyright 1999-2004 American Coders, Ltd.
POB 97462
Raleigh NC 27624 USA
All Rights Reserved.