Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.axis.components.encoding
Class XMLEncoderFactory  view XMLEncoderFactory download XMLEncoderFactory.java

java.lang.Object
  extended byorg.apache.axis.components.encoding.XMLEncoderFactory

public class XMLEncoderFactory
extends java.lang.Object

Factory for XMLEncoder


Field Summary
static java.lang.String DEFAULT_ENCODING
           
private static java.util.Map encoderMap
           
static java.lang.String ENCODING_UTF_16
           
static java.lang.String ENCODING_UTF_8
           
protected static org.apache.commons.logging.Log log
           
private static java.lang.String PLUGABLE_PROVIDER_FILENAME
           
 
Constructor Summary
XMLEncoderFactory()
           
 
Method Summary
static XMLEncoder getDefaultEncoder()
          Returns the default encoder
static XMLEncoder getEncoder(java.lang.String encoding)
          Returns the requested encoder
private static void loadPluggableEncoders()
          Look for file META-INF/services/org.apache.axis.components.encoding.XMLEncoder in all the JARS, get the classes listed in those files and add them to encoders list if they are valid encoders.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

ENCODING_UTF_8

public static final java.lang.String ENCODING_UTF_8
See Also:
Constant Field Values

ENCODING_UTF_16

public static final java.lang.String ENCODING_UTF_16
See Also:
Constant Field Values

DEFAULT_ENCODING

public static final java.lang.String DEFAULT_ENCODING
See Also:
Constant Field Values

encoderMap

private static java.util.Map encoderMap

PLUGABLE_PROVIDER_FILENAME

private static final java.lang.String PLUGABLE_PROVIDER_FILENAME
See Also:
Constant Field Values
Constructor Detail

XMLEncoderFactory

public XMLEncoderFactory()
Method Detail

getDefaultEncoder

public static XMLEncoder getDefaultEncoder()
Returns the default encoder


getEncoder

public static XMLEncoder getEncoder(java.lang.String encoding)
                             throws java.io.UnsupportedEncodingException
Returns the requested encoder


loadPluggableEncoders

private static void loadPluggableEncoders()
Look for file META-INF/services/org.apache.axis.components.encoding.XMLEncoder in all the JARS, get the classes listed in those files and add them to encoders list if they are valid encoders. Here is how the scheme would work. A company providing a new encoder will jar up their encoder related classes in a JAR file. The following file containing the name of the new encoder class is also made part of this JAR file. META-INF/services/org.apache.axis.components.encoding.XMLEncoder By making this JAR part of the webapp, the new encoder will be automatically discovered.