Package tv.hd3g.transfertfiles.filters
Class DataExchangeFilterOutputStream
java.lang.Object
tv.hd3g.transfertfiles.filters.DataExchangeFilterOutputStream
- All Implemented Interfaces:
DataExchangeFilter
Not reusable
-
Field Summary
Fields inherited from interface tv.hd3g.transfertfiles.filters.DataExchangeFilter
DEFAULT_BUFFER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionDataExchangeFilterOutputStream(tv.hd3g.transfertfiles.filters.UnaryIOExceptionOperator<OutputStream> streamProvider) DataExchangeFilterOutputStream(tv.hd3g.transfertfiles.filters.UnaryIOExceptionOperator<OutputStream> streamProvider, int defaultBufferSize) -
Method Summary
Modifier and TypeMethodDescriptionapplyDataFilter(boolean last, BufferVault dataSource) intEnsure to all applyDataFilter call will contain a total dataSources size equals/more than with this value.voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface tv.hd3g.transfertfiles.filters.DataExchangeFilter
getFilterName
-
Constructor Details
-
DataExchangeFilterOutputStream
public DataExchangeFilterOutputStream(tv.hd3g.transfertfiles.filters.UnaryIOExceptionOperator<OutputStream> streamProvider, int defaultBufferSize) -
DataExchangeFilterOutputStream
public DataExchangeFilterOutputStream(tv.hd3g.transfertfiles.filters.UnaryIOExceptionOperator<OutputStream> streamProvider)
-
-
Method Details
-
applyDataFilter
- Specified by:
applyDataFilterin interfaceDataExchangeFilter- Parameters:
last- if true, you should use flush/close internal needs and return last responses, because applyDataFilter will never be called for the current instance.- Returns:
- empty for "ignore" filter/data collector filter null for stop data transfert operation returned BufferVault can be re-used here after, and can be empty after call
- Throws:
IOException
-
ensureMinDataSourcesDataLength
public int ensureMinDataSourcesDataLength()Description copied from interface:DataExchangeFilterEnsure to all applyDataFilter call will contain a total dataSources size equals/more than with this value. Else applyDataFilter with last = true will be called- Specified by:
ensureMinDataSourcesDataLengthin interfaceDataExchangeFilter- Returns:
- byte count
-
onCancelTransfert
public void onCancelTransfert()- Specified by:
onCancelTransfertin interfaceDataExchangeFilter
-