public class ocsp_response
extends java.net.ContentHandler
To use this content handler either install the corresponding
OCSPContentHandlerFactory
for your URLConnection or register this handler
package by setting the System property java.content.handler.pkgs:
HttpURLConnection.setContentHandlerFactory(new OCSPContentHandlerFactory());or
System.getProperties().put("java.content.handler.pkgs", "iaik.x509.ocsp.net");Registering this content handler (factory) allows you to call the getContent() method on an URLConnection object, e.g.:
URL url = ...; HttpURLConnection con = (HttpURLConnection)url.openConnection(); ... OCSPResponse ocspResponse = (OCSPResponse)con.getContent(); ...
OCSPRequest
,
OCSPResponse
,
OCSPContentHandlerFactory
Constructor and Description |
---|
ocsp_response() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getContent(java.net.URLConnection con)
Reads an OCSPResponse/OCSPRequest from the given URLConnection.
|
public java.lang.Object getContent(java.net.URLConnection con) throws java.io.IOException
getContent
in class java.net.ContentHandler
con
- the URLConnection from which to read the OCSP objectOCSPResponse
or
OCSPRequest
object, depending
on the type of OCSP object the given URLConnection suppliesjava.io.IOException
- if the content supplied by the given URLConnection is not a
OCSPResponse or OCSPRequest