All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.axet.wget.errors.ProxyAuth Maven / Gradle / Ivy

package com.github.axet.wget.errors;

import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;

public class ProxyAuth extends RuntimeException {
    private static final long serialVersionUID = 1L;

    public URLConnection c;

    public ProxyAuth(URLConnection c) {
        this.c = c;
    }

    public ProxyAuth(Throwable e) {
        super(e);
    }

    public ProxyAuth(String msg) {
        super(msg);
    }

    public URL getMoved() {
        try {
            return new URL(c.getHeaderField("Location"));
        } catch (MalformedURLException e) {
            throw new DownloadError(e);
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy