org.qi4j.io
Interface Input<T,SenderThrowableType extends java.lang.Throwable>


public interface Input<T,SenderThrowableType extends java.lang.Throwable>

Input source of data.

Invoke transferTo to send data from this input to given output. transferTo can be invoked as many times as you want. The transferTo implementation must ensure that any exceptions thrown by the Input or the Output which transferred data is sent to is handled properly, i.e. that resources are closed. Any client code to transferTo calls should not have to bother with resource management, but may catch exceptions anyway for logging and similar purposes.


Method Summary
<ReceiverThrowableType extends java.lang.Throwable>
void
transferTo(Output<? super T,ReceiverThrowableType> output)
           
 

Method Detail

transferTo

<ReceiverThrowableType extends java.lang.Throwable> void transferTo(Output<? super T,ReceiverThrowableType> output)
                throws SenderThrowableType extends java.lang.Throwable,
                       ReceiverThrowableType extends java.lang.Throwable
Throws:
SenderThrowableType extends java.lang.Throwable