public class OCSPContentHandlerFactory
extends java.lang.Object
implements java.net.ContentHandlerFactory
When installing this content handler factory for your URLConnection you may
use the corresponding content handler
for reading OCSP requests/responses from an URLConnection:
HttpURLConnection.setContentHandlerFactory(new OCSPContentHandlerFactory());Alternatively you immediately may register the content
content handler
setting
the System property java.content.handler.pkgs:
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
,
ocsp_response
Constructor and Description |
---|
OCSPContentHandlerFactory() |
Modifier and Type | Method and Description |
---|---|
java.net.ContentHandler |
createContentHandler(java.lang.String mimeType)
Returns a content handler for the given OCSP type.
|
public java.net.ContentHandler createContentHandler(java.lang.String mimeType)
createContentHandler
in interface java.net.ContentHandlerFactory
mimeType
- the OCSP content type, eiher "application/ocsp-request" or
"application/ocsp-response"content
handler
for the given type, or null
if the given type
is not "application/ocsp-request" or "application/ocsp-response"