Packages

p

vdx

fetchfile

package fetchfile

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. fetchfile
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. trait Downloader[F[_]] extends AnyRef

    Given a url and an OutputStream the fetch function populates the stream with the content of the HTTP resource.

    Given a url and an OutputStream the fetch function populates the stream with the content of the HTTP resource. Considering the intended functionality of this interface, the outputsream is usually a FileOutputStream

    Example:

    fetch(
      new URL("http://example.com/path/to/large.file"),
      Resource.fromAutoClosable(new FileOutputStream(new File("/path/to/destination.file")))
    )
  2. type HttpClient[F[_]] = (URL) => (Sink[F]) => F[Unit]

    A HttpClient is a function from a URL and Sink function the content length and the content itself as an fs2 Stream

  3. final case class HttpClientException(message: String, cause: Exception = None.orNull) extends Exception with Product with Serializable
  4. trait MonotonicClock extends AnyRef

    Representation of a clock.

    Representation of a clock. In case of cats.effect.Clock[F], the evaluation of IO makes the stream slightly slower. To avoid this performance impact, but still keep the progress tracker testable we introduce our own clock interface.

  5. type Sink[F[_]] = (ContentLength, Stream[F, Byte]) => F[Unit]

    Sink represents a function that takes the content length and the content as a stream and consumes it

Value Members

  1. object Downloader
  2. object HttpURLConnectionClient

    A HttpClient implementation based on java.net.HttpURLConnection.

  3. object MonotonicClock
  4. object Pipes
  5. object Progress

Inherited from AnyRef

Inherited from Any

Ungrouped