Class DataExchangeFilterOutputStream

java.lang.Object
tv.hd3g.transfertfiles.filters.DataExchangeFilterOutputStream
All Implemented Interfaces:
DataExchangeFilter

public class DataExchangeFilterOutputStream extends Object implements DataExchangeFilter
Not reusable
  • 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

      public BufferVault applyDataFilter(boolean last, BufferVault dataSource) throws IOException
      Specified by:
      applyDataFilter in interface DataExchangeFilter
      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: DataExchangeFilter
      Ensure 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:
      ensureMinDataSourcesDataLength in interface DataExchangeFilter
      Returns:
      byte count
    • onCancelTransfert

      public void onCancelTransfert()
      Specified by:
      onCancelTransfert in interface DataExchangeFilter