Package tv.hd3g.transfertfiles.filters
Class DataExchangeFilterOutputStream
- java.lang.Object
-
- tv.hd3g.transfertfiles.filters.DataExchangeFilterOutputStream
-
- All Implemented Interfaces:
DataExchangeFilter
- Direct Known Subclasses:
DataExchangeFilterCompress
public class DataExchangeFilterOutputStream extends Object implements DataExchangeFilter
Not reusable
-
-
Field Summary
-
Fields inherited from interface tv.hd3g.transfertfiles.filters.DataExchangeFilter
DEFAULT_BUFFER_SIZE
-
-
Constructor Summary
Constructors Constructor Description DataExchangeFilterOutputStream(tv.hd3g.transfertfiles.filters.UnaryIOExceptionOperator<OutputStream> streamProvider)DataExchangeFilterOutputStream(tv.hd3g.transfertfiles.filters.UnaryIOExceptionOperator<OutputStream> streamProvider, int defaultBufferSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BufferVaultapplyDataFilter(boolean last, BufferVault dataSource)intensureMinDataSourcesDataLength()Ensure to all applyDataFilter call will contain a total dataSources size equals/more than with this value.voidonCancelTransfert()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface tv.hd3g.transfertfiles.filters.DataExchangeFilter
getFilterName
-
-
-
-
Constructor Detail
-
DataExchangeFilterOutputStream
public DataExchangeFilterOutputStream(tv.hd3g.transfertfiles.filters.UnaryIOExceptionOperator<OutputStream> streamProvider, int defaultBufferSize)
-
DataExchangeFilterOutputStream
public DataExchangeFilterOutputStream(tv.hd3g.transfertfiles.filters.UnaryIOExceptionOperator<OutputStream> streamProvider)
-
-
Method Detail
-
applyDataFilter
public BufferVault applyDataFilter(boolean last, BufferVault dataSource) throws IOException
- 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
-
-