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.5 to JDK 11. The APIs can be used in conjunction with a JCE/JCA provider such as the one provided with the Bouncy Castle Cryptography APIs.

There is a newer version: 1.70
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 - 2024 Weber Informatics LLC | Privacy Policy