org.apache.james.core
Class MimeMessageInputStreamSource

java.lang.Object
  |
  +--org.apache.james.core.MimeMessageSource
        |
        +--org.apache.james.core.MimeMessageInputStreamSource

public class MimeMessageInputStreamSource
extends MimeMessageSource

Takes an input stream and creates a repeatable input stream source for a MimeMessageWrapper. It does this by completely reading the input stream and saving that to a temporary file that should delete on exit, or when this object is GC'd.

Author:
Serge Knystautas Modified by Oki DZ Thu Oct 4 15:15:27 WIT 2001
See Also:
MimeMessageWrapper

Constructor Summary
MimeMessageInputStreamSource(java.lang.String key, java.io.InputStream in)
           
 
Method Summary
 void finalize()
           
 java.io.InputStream getInputStream()
          Return an input stream to the data
 long getMessageSize()
          Return the size of the temp file
 java.lang.String getSourceId()
          Returns the unique identifier of this input stream source
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MimeMessageInputStreamSource

public MimeMessageInputStreamSource(java.lang.String key,
                                    java.io.InputStream in)
Method Detail

getSourceId

public java.lang.String getSourceId()
Returns the unique identifier of this input stream source

Specified by:
getSourceId in class MimeMessageSource

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Return an input stream to the data

Specified by:
getInputStream in class MimeMessageSource
java.io.IOException

getMessageSize

public long getMessageSize()
                    throws java.io.IOException
Return the size of the temp file

Overrides:
getMessageSize in class MimeMessageSource
java.io.IOException

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object


"Copyright © 2001 Apache Jakarta Project. All Rights Reserved."