public final class Wget extends Object
Wget is intentionally simple and dependency-free. It opens a connection to
an http:// or https:// URL, honours user-defined time-outs, and streams
at most N bytes into a supplied Appendable. Everything that touches
the outside world can be replaced via the Wget.Builder for predictable tests.
| Modifier and Type | Class and Description |
|---|---|
static class |
Wget.Builder |
static interface |
Wget.CharsetDetector
Decides which charset to use when decoding the response body.
|
static interface |
Wget.ConnectionProvider
Opens a (potentially mocked) connection for the given URL.
|
| Modifier and Type | Method and Description |
|---|---|
void |
fetch(String url,
Appendable out) |
static void |
url(String url,
StringBuilder sb)
Shortcut that uses the default configuration.
|
public static void url(String url, StringBuilder sb) throws IOException
IOExceptionpublic void fetch(String url, Appendable out) throws IOException
IOExceptionCopyright © 2026 Chronicle Software Ltd. All rights reserved.