autohit.universe
Class UniverseDataSource

java.lang.Object
  extended byautohit.universe.UniverseDataSource
All Implemented Interfaces:
javax.activation.DataSource

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

A Universe Data Source useable by the activation framework. This is a lightweight implementation. It is not valid until init(...) is called.

Version:
1.0 Version History EPG - New - 8Aug03
Author:
Erich P. Gatejen

Field Summary
 java.lang.String name
          Name of this universe object.
 Universe uni
          Owning universe.
 
Constructor Summary
UniverseDataSource()
          Default Constructor.
 
Method Summary
 java.lang.String getContentType()
          Get the content type.
 java.io.InputStream getInputStream()
          Get the InputStream for this source.
 java.lang.String getName()
          Get the underlying object descriptor.
 java.io.OutputStream getOutputStream()
          Get the OutStream for this source.
 void init(java.lang.String uniObj, Universe u)
          Initializer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public java.lang.String name
Name of this universe object.


uni

public Universe uni
Owning universe.

Constructor Detail

UniverseDataSource

public UniverseDataSource()
Default Constructor.

Method Detail

init

public void init(java.lang.String uniObj,
                 Universe u)
Initializer.

Parameters:
uniObj - name of the universe object to source.
u - the universe to source from.

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Get the InputStream for this source.

Specified by:
getInputStream in interface javax.activation.DataSource
Returns:
The input stream
Throws:
java.io.IOException

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Get the OutStream for this source. This implementation doesn't support this.

Specified by:
getOutputStream in interface javax.activation.DataSource
Returns:
The input stream
Throws:
java.io.IOException

getContentType

public java.lang.String getContentType()
Get the content type. LIE! We'll always say an octet stream.

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

getName

public java.lang.String getName()
Get the underlying object descriptor.

Specified by:
getName in interface javax.activation.DataSource
Returns:
the type


Test.