com.ibm.portal.resolver.streams
Class MultipartOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by com.ibm.portal.resolver.streams.MultipartOutputStream
All Implemented Interfaces:
MultipartStream, java.io.Closeable, java.io.Flushable

public abstract class MultipartOutputStream
extends java.io.OutputStream
implements MultipartStream

Implementation of a stream that can be used to produce multipart streams. Implementations of this stream can be retrieved via the StreamFactory. The usage of this class is similar to ZipOutputStream. In order to produce a multipart output

Since:
6.1.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ibm.portal.resolver.streams.MultipartStream
MultipartStream.Entry
 
Field Summary
 
Fields inherited from interface com.ibm.portal.resolver.streams.MultipartStream
CONTENT_TYPE_FORM_DATA, KEY_CONTENT_DISPOSITION, KEY_FILENAME, KEY_MIME_BOUNDARY, KEY_NAME, VALUE_FORM_DATA
 
Constructor Summary
MultipartOutputStream()
           
 
Method Summary
abstract  void finish()
          Finishes writing the contents of the multipart output stream without closing the underlying stream.
abstract  void putNextEntry(MultipartStream.Entry entry)
          Begins writing a new multipart file entry and positions the stream to the start of the entry data.
 
Methods inherited from class java.io.OutputStream
close, flush, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.portal.resolver.streams.MultipartStream
closeEntry
 

Constructor Detail

MultipartOutputStream

public MultipartOutputStream()
Method Detail

putNextEntry

public abstract void putNextEntry(MultipartStream.Entry entry)
                           throws java.io.IOException
Begins writing a new multipart file entry and positions the stream to the start of the entry data. Closes the current entry if still active.

Parameters:
entry - the multipart entry to be written. This parameter may be null, in this case no headers are written and the defaults aply
Throws:
java.io.IOException - - if an I/O error has occurred

finish

public abstract void finish()
                     throws java.io.IOException
Finishes writing the contents of the multipart output stream without closing the underlying stream. Use this method when applying multiple filters in succession to the same output stream.

Throws:
java.io.IOException - - if an I/O error has occurred