org.decisiondeck.utils
Class ByteArraysSupplier

java.lang.Object
  extended by org.decisiondeck.utils.ByteArraysSupplier
All Implemented Interfaces:
OutputSupplier<ByteArrayOutputStream>

public class ByteArraysSupplier
extends Object
implements OutputSupplier<ByteArrayOutputStream>


Constructor Summary
ByteArraysSupplier()
           
 
Method Summary
 Collection<ByteArrayOutputStream> getArrays()
          Retrieves the arrays created on demand by this object, as a read-only view.
 ByteArrayOutputStream getOutput()
           
 Collection<String> getWrittenStrings(Charset charset)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArraysSupplier

public ByteArraysSupplier()
Method Detail

getArrays

public Collection<ByteArrayOutputStream> getArrays()
Retrieves the arrays created on demand by this object, as a read-only view. The byte arrays in the returned set are writable (but they are not intended to be written). The iteration order of the returned collection matches the order of the requested outputs.

Returns:
not null.

getWrittenStrings

public Collection<String> getWrittenStrings(Charset charset)

getOutput

public ByteArrayOutputStream getOutput()
                                throws IOException
Specified by:
getOutput in interface OutputSupplier<ByteArrayOutputStream>
Throws:
IOException


Copyright © 2011. All Rights Reserved.