mx4j.tools.adaptor.http

Class HttpUtil


public class HttpUtil
extends java.lang.Object

Utility methods for the HTTP adaptor

Version:
$Revision: 1.3 $

Method Summary

static boolean
booleanVariableValue(HttpInputStream in, String variable, boolean defaultValue)
Returns whether a boolean variable is in the variables.
static String
canonicalizePath(String path)
Makes a path canonical
static String
getCodeMessage(int code)
Gets a message apropriate for a give HTTP code
protected static int
indexOf(char[] chars, int length, char chr, int from)

Method Details

booleanVariableValue

public static boolean booleanVariableValue(HttpInputStream in,
                                           String variable,
                                           boolean defaultValue)
Returns whether a boolean variable is in the variables. It tries to find it. If not found the the default is used. If found is tested to check if it is true or 1 and the answer is true. Otherwise is false


canonicalizePath

public static String canonicalizePath(String path)
Makes a path canonical

Parameters:
path - Target path

Returns:
The canonicalized path


getCodeMessage

public static String getCodeMessage(int code)
Gets a message apropriate for a give HTTP code

Parameters:
code - Reference Code

Returns:
The result message

See Also:
HttpConstants


indexOf

protected static int indexOf(char[] chars,
                             int length,
                             char chr,
                             int from)


Copyright © 2001-2003 MX4J Team. All Rights Reserved.