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

org.bouncycastle.est.ESTRequest Maven / Gradle / Ivy

Go to download

The Bouncy Castle Java APIs for CMS, PKCS, EAC, TSP, CMP, CRMF, OCSP, and certificate generation. This jar contains APIs for JDK 1.8 and up. The APIs are designed primarily to be used in conjunction with the BC LTS provider but may also be used with other providers providing cryptographic services.

There is a newer version: 2.73.7
Show newest version
package org.bouncycastle.est;

import java.io.IOException;
import java.io.OutputStream;
import java.net.URL;
import java.util.Map;

/**
 * Implements a basic http request.
 */
public class ESTRequest
{
    final String method;
    final URL url;
    HttpUtil.Headers headers = new HttpUtil.Headers();
    final byte[] data;
    final ESTHijacker hijacker;
    final ESTClient estClient;
    final ESTSourceConnectionListener listener;

    ESTRequest(
        String method,
        URL url,
        byte[] data,
        ESTHijacker hijacker,
        ESTSourceConnectionListener listener,
        HttpUtil.Headers headers,
        ESTClient estClient)
    {
        this.method = method;
        this.url = url;
        this.data = data;
        this.hijacker = hijacker;
        this.listener = listener;
        this.headers = headers;
        this.estClient = estClient;
    }

    public String getMethod()
    {
        return method;
    }

    public URL getURL()
    {
        return url;
    }

    public Map getHeaders()
    {
        return (Map)headers.clone();
    }

    public ESTHijacker getHijacker()
    {
        return hijacker;
    }

    public ESTClient getClient()
    {
        return estClient;
    }

    public ESTSourceConnectionListener getListener()
    {
        return listener;
    }

    public void writeData(OutputStream os)
        throws IOException
    {
        if (data != null)
        {
            os.write(data);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy