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 newTrackingSinkinstance. -
Method Summary
Methods inherited from class okio.ForwardingSink
close, delegate, -deprecated_delegate, flush, timeout, toString
-
Constructor Details
-
TrackingSink
public TrackingSink(@NonNull okio.Sink delegate, @NonNull TransferProgressCallback callback, long totalBytes) Creates a newTrackingSinkinstance.- Parameters:
delegate- the sink to trackcallback- the callback to notify of progresstotalBytes- the total number of bytes to transfer
-
-
Method Details
-
write
- Specified by:
writein interfaceokio.Sink- Overrides:
writein classokio.ForwardingSink- Throws:
IOException
-