OOP FormGenerator Version 3.1

com.oopreserch.web
Class UrlEncodeAscii

java.lang.Object
  |
  +--com.oopreserch.web.UrlEncodeAscii
All Implemented Interfaces:
FormValueEscaper
Direct Known Subclasses:
UrlEncodeShiftJis, UrlEncodeUtf8

public class UrlEncodeAscii
extends java.lang.Object
implements FormValueEscaper

The implementation of FormValueEscaper interface. By ISO-8859-1, the given String will be URL-encoded.

The implementations for UTF-8 and Shift_JIS are also included in this package. They are:

To specify another charset by which the String is URL-encoded, please define your own implementation of FormValueEscaper interface. For example, if you'd like to URL-encode the String by EUC-JP, you need to define such an implementation of FormValueEscaper interface.
By extending this class, you can easily define your implementation. All you have to do is to override the value of:
    protected String charset="ISO-8859-1";
 
within your subclass. The constructor will be the good place for this task.
All the available implementations of this interface must be defined in: In this property resource file, the value is the fully qualified class name of each implementation. The corresponding key is the arbitrary String, and you can specify it as the value of escape.type attribute in d.value element in the XML. For details about this property resource file, please look into FormValueEscaperFactory.

Author:
Jun Inamori

Constructor Summary
UrlEncodeAscii()
           
 
Method Summary
 java.lang.String getEscaped(java.lang.String org)
          URL-encode the given String by ISO-8859-1.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlEncodeAscii

public UrlEncodeAscii()
Method Detail

getEscaped

public java.lang.String getEscaped(java.lang.String org)
URL-encode the given String by ISO-8859-1.

Specified by:
getEscaped in interface FormValueEscaper
Parameters:
org - The original String
Returns:
The URL-encoded String

OOP FormGenerator Version 3.1

ALL CONTENTS COPYRIGHT 2002, Jun Inamori. All rights reserved.
Any questions and comments are welcome to Jun Inamori.