## mx4j.tools.adaptor.http
Class HttpUtil

    java.lang.Object
      mx4j.tools.adaptor.http.HttpUtil

public class HttpUtil
extends java.lang.Object

Utility methods for the HTTP adaptor

Version:
  $Revision: 1.3 $

Constructor Summary
`HttpUtil()`

Method Summary
`static boolean` `booleanVariableValue(HttpInputStream in, java.lang.String variable, boolean defaultValue)` Returns whether a boolean variable is in the variables.
`static java.lang.String` `canonicalizePath(java.lang.String path)` Makes a path canonical
`static java.lang.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)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HttpUtil

    public HttpUtil()

Method Detail

### getCodeMessage

    public static java.lang.String getCodeMessage(int code)

  Gets a message apropriate for a give HTTP code

  Parameters:
    `code` - Reference Code
  Returns:
    The result message
  See Also:
    `HttpConstants`

### canonicalizePath

    public static java.lang.String canonicalizePath(java.lang.String path)

  Makes a path canonical

  Parameters:
    `path` - Target path
  Returns:
    The canonicalized path

### indexOf

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

### booleanVariableValue

    public static boolean booleanVariableValue(HttpInputStream in,
                                               java.lang.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

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