org.seasar.cubby.internal.util
クラス URLBodyEncoder

java.lang.Object
  上位を拡張 org.seasar.cubby.internal.util.URLBodyEncoder

public class URLBodyEncoder
extends Object

URL ボディ部のエンコーダです。

作成者:
baba

フィールドの概要
protected static byte ESCAPE_CHAR
           
protected static BitSet WWW_FORM_URL
          BitSet of www-form-url safe characters.
 
メソッドの概要
static byte[] encode(byte[] bytes)
          Encodes an array of bytes into an array of URL safe 7-bit characters.
static String encode(String pString, String charset)
          Encodes a string into its URL safe form using the specified string charset.
static byte[] encodeUrl(BitSet urlsafe, byte[] bytes)
          Encodes an array of bytes into an array of URL safe 7-bit characters.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

ESCAPE_CHAR

protected static byte ESCAPE_CHAR

WWW_FORM_URL

protected static final BitSet WWW_FORM_URL
BitSet of www-form-url safe characters.

メソッドの詳細

encodeUrl

public static final byte[] encodeUrl(BitSet urlsafe,
                                     byte[] bytes)
Encodes an array of bytes into an array of URL safe 7-bit characters. Unsafe characters are escaped.

パラメータ:
urlsafe - bitset of characters deemed URL safe
bytes - array of bytes to convert to URL safe characters
戻り値:
array of bytes containing URL safe characters

encode

public static byte[] encode(byte[] bytes)
Encodes an array of bytes into an array of URL safe 7-bit characters. Unsafe characters are escaped.

パラメータ:
bytes - array of bytes to convert to URL safe characters
戻り値:
array of bytes containing URL safe characters

encode

public static String encode(String pString,
                            String charset)
                     throws UnsupportedEncodingException
Encodes a string into its URL safe form using the specified string charset. Unsafe characters are escaped.

パラメータ:
pString - string to convert to a URL safe form
charset - the charset for pString
戻り値:
URL safe string
例外:
UnsupportedEncodingException - Thrown if charset is not supported


Copyright © 2006-2010 The Seasar Foundation. All Rights Reserved.