Class TransferFileWriter

java.lang.Object
com.amilesend.client.connection.file.TransferFileWriter

public class TransferFileWriter extends Object
A file writer utility used while downloading files that reports transfer progress to the configured TransferProgressCallback.
See Also:
  • Method Details

    • write

      public long write(@NonNull @NonNull okio.BufferedSource source, long size) throws IOException
      Writes the given source (streamed response body) to the configured output.
      Parameters:
      source - the source to read the contents from
      size - the total expected size of the contents in bytes
      Returns:
      the number of total read bytes
      Throws:
      IOException - if unable to write the contents to the configured path
    • builder