org.apache.james.util.stream
Class MessageStream

java.lang.Object
  extended by org.apache.james.util.stream.MessageStream

public class MessageStream
extends java.lang.Object

Helper class to write to temporary file for transfer data. This is mostly useful for writing large chunk of data back the the client. This Object is designed for one time use..


Constructor Summary
MessageStream()
          Create new MessageStream on a temporary File
 
Method Summary
 DisposeOnCloseInputStream getInputStream()
          Return the DisposeOnCloseInputStream of the temporary file
 java.io.OutputStream getOutputStream()
          Return the OutputStream of the temporary file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageStream

public MessageStream()
              throws java.io.IOException
Create new MessageStream on a temporary File

Throws:
java.io.IOException
Method Detail

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Return the OutputStream of the temporary file

Returns:
out
Throws:
java.io.IOException

getInputStream

public DisposeOnCloseInputStream getInputStream()
                                         throws java.io.IOException
Return the DisposeOnCloseInputStream of the temporary file

Returns:
in
Throws:
java.io.IOException


Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.