com.ibm.di.connector.WSReceiverServerConnector
Class HTTPHeaders

java.lang.Object
  extended by com.ibm.di.connector.WSReceiverServerConnector.HTTPHeaders

public class HTTPHeaders
extends Object

HttpHeader is an object that aides in the creation of a response header.


Constructor Summary
HTTPHeaders()
           
 
Method Summary
static boolean matches(byte[] buf, byte[] target)
          The method accepts two byte array and returns true if they match.
static boolean matches(byte[] buf, int bufIdx, byte[] target)
          The method accepts two byte array and returns true if the part of the first one starting from position bufIdx matches the second one.
static boolean matchesCase(byte[] buf, byte[] target)
          The method accepts two byte array and returns true if they match.
static int parseHeaders(org.apache.axis.transport.http.NonBlockingBufferedInputStream is, byte[] buf, StringBuffer contentType, StringBuffer contentLocation, StringBuffer soapAction, StringBuffer httpRequest, StringBuffer fileName, StringBuffer cookie, StringBuffer cookie2, StringBuffer authInfo, StringBuffer host)
          Parses headers from the given stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPHeaders

public HTTPHeaders()
Method Detail

matches

public static boolean matches(byte[] buf,
                              byte[] target)
The method accepts two byte array and returns true if they match. Note: The first array is translated in lower cases and the second one should be in lower cases

Parameters:
buf - byte array
target - byte array
Returns:
boolean

matchesCase

public static boolean matchesCase(byte[] buf,
                                  byte[] target)
The method accepts two byte array and returns true if they match. Note: Case sensitive

Parameters:
buf - byte array
target - byte array
Returns:
boolean

matches

public static boolean matches(byte[] buf,
                              int bufIdx,
                              byte[] target)
The method accepts two byte array and returns true if the part of the first one starting from position bufIdx matches the second one. Note: The first array is translated in lower cases and the second one should be in lower cases

Parameters:
buf - byte array
bufIdx - int , the position , where the comparison begins
target - byte array
Returns:
boolean

parseHeaders

public static int parseHeaders(org.apache.axis.transport.http.NonBlockingBufferedInputStream is,
                               byte[] buf,
                               StringBuffer contentType,
                               StringBuffer contentLocation,
                               StringBuffer soapAction,
                               StringBuffer httpRequest,
                               StringBuffer fileName,
                               StringBuffer cookie,
                               StringBuffer cookie2,
                               StringBuffer authInfo,
                               StringBuffer host)
                        throws IOException
Parses headers from the given stream.

Parameters:
is - NonBlockingBufferedInputStream
buf - byte array
contentType - StringBuffer
contentLocation - StringBuffer
soapAction - StringBuffer
httpRequest - StringBuffer
fileName - StringBuffer
cookie - StringBuffer
cookie2 - StringBuffer
authInfo - StringBuffer
host - StringBuffer
Returns:
int , content length
Throws:
IOException