Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.gateway
Class AttachmentDataSource

java.lang.Object
  extended by com.jivesoftware.forum.gateway.AttachmentDataSource
All Implemented Interfaces:
javax.activation.DataSource

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

Provides a datasource wrapper for an Attachment object.


Constructor Summary
AttachmentDataSource(Attachment attachment)
          Constructor
 
Method Summary
 java.lang.String getContentType()
          Return the content type associated with the request
 java.io.InputStream getInputStream()
          Returns an input stream of the request data
 java.lang.String getName()
          Returns the name of the attachment
 java.io.OutputStream getOutputStream()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttachmentDataSource

public AttachmentDataSource(Attachment attachment)
                     throws java.io.IOException
Constructor

Throws:
java.io.IOException
Method Detail

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Specified by:
getOutputStream in interface javax.activation.DataSource
Throws:
java.io.IOException

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Returns an input stream of the request data

Specified by:
getInputStream in interface javax.activation.DataSource
Returns:
an input stream
Throws:
java.io.IOException - if an error occurs reading from the underlying InputStream

getName

public java.lang.String getName()
Returns the name of the attachment

Specified by:
getName in interface javax.activation.DataSource
Returns:
name the ip of the remote user

getContentType

public java.lang.String getContentType()
Return the content type associated with the request

Specified by:
getContentType in interface javax.activation.DataSource
Returns:
contentType

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.