com.sibvisions.util
Class ByteArrayDataSource

java.lang.Object
  extended by com.sibvisions.util.ByteArrayDataSource
All Implemented Interfaces:
DataSource

public final class ByteArrayDataSource
extends Object
implements DataSource

The ByteArrayDataSource class is a utility class for IFileHandle data.


Constructor Summary
ByteArrayDataSource(String pName, byte[] pContent)
          Constructs a new ByteArrayDataSource.
ByteArrayDataSource(String pName, InputStream pContent)
          Constructs a new ByteArrayDataSource.
 
Method Summary
 String getContentType()
          
 FileTypeMap getFileTypeMap()
          Gets the FileTypeMap.
 InputStream getInputStream()
          
 String getName()
          
 OutputStream getOutputStream()
          
 void setFileTypeMap(FileTypeMap pFileTypeMap)
          Sets the FileTypeMap.
 void setName(String pName)
          Sets the name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayDataSource

public ByteArrayDataSource(String pName,
                           byte[] pContent)
Constructs a new ByteArrayDataSource.

Parameters:
pName - the name.
pContent - the file handle.

ByteArrayDataSource

public ByteArrayDataSource(String pName,
                           InputStream pContent)
Constructs a new ByteArrayDataSource.

Parameters:
pName - the name.
pContent - the file handle.
Method Detail

getContentType

public String getContentType()

Specified by:
getContentType in interface DataSource

getInputStream

public InputStream getInputStream()
                           throws IOException

Specified by:
getInputStream in interface DataSource
Throws:
IOException

getName

public String getName()

Specified by:
getName in interface DataSource

getOutputStream

public OutputStream getOutputStream()
                             throws IOException

Specified by:
getOutputStream in interface DataSource
Throws:
IOException

getFileTypeMap

public FileTypeMap getFileTypeMap()
Gets the FileTypeMap.

Returns:
the FileTypeMap.

setFileTypeMap

public void setFileTypeMap(FileTypeMap pFileTypeMap)
Sets the FileTypeMap.

Parameters:
pFileTypeMap - the FileTypeMap.

setName

public void setName(String pName)
Sets the name.

Parameters:
pName - the name.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.