Class TrackingSink
java.lang.Object
okio.ForwardingSink
com.amilesend.client.connection.file.TrackingSink
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
,okio.Sink
public class TrackingSink
extends okio.ForwardingSink
Tracking sink to monitor the amount of bytes transferred.
-
Constructor Summary
ConstructorsConstructorDescriptionTrackingSink
(@NonNull okio.Sink delegate, @NonNull TransferProgressCallback callback, long totalBytes) Creates a newTrackingSink
instance. -
Method Summary
Methods inherited from class okio.ForwardingSink
close, delegate, -deprecated_delegate, flush, timeout, toString
-
Constructor Details
-
TrackingSink
public TrackingSink(@NonNull @NonNull okio.Sink delegate, @NonNull @NonNull TransferProgressCallback callback, long totalBytes) Creates a newTrackingSink
instance.- Parameters:
delegate
- the sink to trackcallback
- the callback to notify of progresstotalBytes
- the total number of bytes to transfer
-
-
Method Details
-
write
- Specified by:
write
in interfaceokio.Sink
- Overrides:
write
in classokio.ForwardingSink
- Throws:
IOException
-