net.sf.mmm.util.io.impl
Class ProcessableDetectorOutputStream

java.lang.Object
  extended by net.sf.mmm.util.io.base.AbstractDetectorStream
      extended by net.sf.mmm.util.io.impl.ProcessableDetectorStream
          extended by net.sf.mmm.util.io.impl.ProcessableDetectorOutputStream
All Implemented Interfaces:
DetectorOutputStream, DetectorStream

public class ProcessableDetectorOutputStream
extends ProcessableDetectorStream
implements DetectorOutputStream

This is the implementation of the DetectorOutputStream.

Since:
1.1.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Nested Class Summary
protected  class ProcessableDetectorOutputStream.WrapperOutputStream
          This inner class is the actual wrapper stream.
 
Field Summary
private  ProcessableDetectorOutputStream.WrapperOutputStream wrapperOutputStream
           
 
Constructor Summary
ProcessableDetectorOutputStream(OutputStream outputStream, Map<String,Object> mutableMetadata, AbstractDetectorStreamProvider provider)
          The constructor.
 
Method Summary
 OutputStream getStream()
          This method gets the wrapped stream.
 
Methods inherited from class net.sf.mmm.util.io.impl.ProcessableDetectorStream
getByteArrayPool, initialize, processInternal
 
Methods inherited from class net.sf.mmm.util.io.base.AbstractDetectorStream
getMetadata, getMutableMetadata, isDone, setDone
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.mmm.util.io.api.DetectorStream
getMetadata, isDone
 

Field Detail

wrapperOutputStream

private final ProcessableDetectorOutputStream.WrapperOutputStream wrapperOutputStream
See Also:
getStream()
Constructor Detail

ProcessableDetectorOutputStream

public ProcessableDetectorOutputStream(OutputStream outputStream,
                                       Map<String,Object> mutableMetadata,
                                       AbstractDetectorStreamProvider provider)
The constructor.

Parameters:
outputStream - is the raw ProcessableDetectorOutputStream.WrapperOutputStream to warp.
mutableMetadata - is the initial mutable metadata.
provider - is the DetectorStreamProvider creating this instance.
Method Detail

getStream

public OutputStream getStream()
This method gets the wrapped stream. After this stream is completely written and closed, the metadata can be retrieved. This requires that the entire data is written and no existing data is appended via the original stream. This method is a simple getter - it will always return the same stream object.

Specified by:
getStream in interface DetectorOutputStream
Returns:
the wrapper stream.


Copyright © 2001-2010 mmm-Team. All Rights Reserved.