Class Format.DefaultEscapeStrategy

java.lang.Object
  extended by Format.DefaultEscapeStrategy
All Implemented Interfaces:
EscapeStrategy
Enclosing class:
Format

 class Format.DefaultEscapeStrategy
extends java.lang.Object
implements EscapeStrategy

Handle common charsets quickly and easily. Use reflection to query the JDK 1.4 CharsetEncoder class for unknown charsets. If JDK 1.4 isn't around, default to no special encoding.


Field Summary
private  int bits
           
(package private)  java.lang.reflect.Method canEncode
           
(package private)  java.lang.Object encoder
           
 
Constructor Summary
Format.DefaultEscapeStrategy(java.lang.String encoding)
           
 
Method Summary
 boolean shouldEscape(char ch)
          Test whether the supplied character should be formatted literally or as a character entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bits

private int bits

encoder

java.lang.Object encoder

canEncode

java.lang.reflect.Method canEncode
Constructor Detail

Format.DefaultEscapeStrategy

public Format.DefaultEscapeStrategy(java.lang.String encoding)
Method Detail

shouldEscape

public boolean shouldEscape(char ch)
Description copied from interface: EscapeStrategy
Test whether the supplied character should be formatted literally or as a character entity.

Specified by:
shouldEscape in interface EscapeStrategy