package fetchfile
- Alphabetic
- By Inheritance
- fetchfile
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- 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 FileOutputStreamExample:
fetch( new URL("http://example.com/path/to/large.file"), Resource.fromAutoClosable(new FileOutputStream(new File("/path/to/destination.file"))) )
- 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
- final case class HttpClientException(message: String, cause: Exception = None.orNull) extends Exception with Product with Serializable
- 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.
- 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
- object Downloader
- object HttpURLConnectionClient
A HttpClient implementation based on java.net.HttpURLConnection.
- object MonotonicClock
- object Pipes
- object Progress