ch.othello.openscep.internal
Class ScepHTTPGet

java.lang.Object
  |
  +--ch.othello.openscep.internal.ScepHTTPGet

public class ScepHTTPGet
extends Object

 $Id: ScepHTTPGet.java,v 1.1 2002/02/07 12:40:56 urut Exp $
 $Log: ScepHTTPGet.java,v $

 

Since:
$Date: 2002/02/07 12:40:56 $
Version:
$Revision: 1.1 $
Author:

Field Summary
(package private)  HttpURLConnection connection
           
(package private)  URL url
           
 
Constructor Summary
ScepHTTPGet(byte[] message, String operation)
          constructor with defaults
ScepHTTPGet(byte[] message, String operation, String path)
          constructor
 
Method Summary
 void disconnect()
          disconnect
 byte[] getContent()
          read content (if there is any) this one is a bit confusing - it reads till the first occurence of "Content-Length", reads the length, reads the two remaining linefeeds and then reads the number of bytes specified as Content-Length.
 String getContentEncoding()
           
 int getContentLength()
           
 String getContentType()
           
 int getResponseCode()
          HTTP code
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

url

URL url

connection

HttpURLConnection connection
Constructor Detail

ScepHTTPGet

public ScepHTTPGet(byte[] message,
                   String operation,
                   String path)
constructor

Parameters:
message - Base64 encoded message
operation -
path -

ScepHTTPGet

public ScepHTTPGet(byte[] message,
                   String operation)
constructor with defaults

Parameters:
message - base64 encoded message
operation -
Method Detail

getContentType

public String getContentType()

getContentEncoding

public String getContentEncoding()

getContentLength

public int getContentLength()

getContent

public byte[] getContent()
read content (if there is any) this one is a bit confusing - it reads till the first occurence of "Content-Length", reads the length, reads the two remaining linefeeds and then reads the number of bytes specified as Content-Length. This is the BER encoded content of the message. Everything else is thrown away/not required.


getResponseCode

public int getResponseCode()
                    throws IOException
HTTP code

IOException

disconnect

public void disconnect()
disconnect



ScepClient is copyright by Ueli Rutishauser + Alain Schaefer