org.enhydra.apache.xml.serialize
Class SerializerFactoryImpl

java.lang.Object
  |
  +--org.enhydra.apache.xml.serialize.SerializerFactory
        |
        +--org.enhydra.apache.xml.serialize.SerializerFactoryImpl

final class SerializerFactoryImpl
extends SerializerFactory

Default serializer factory can construct serializers for the three markup serializers (XML, HTML, XHTML ).

Version:
$Revision: 1.1.1.1 $ $Date: 2003/03/10 16:34:53 $
Author:
Scott Boag, Assaf Arkin

Field Summary
 
Fields inherited from class org.enhydra.apache.xml.serialize.SerializerFactory
FactoriesProperty
 
Constructor Summary
(package private) SerializerFactoryImpl(java.lang.String method)
           
 
Method Summary
protected  java.lang.String getSupportedMethod()
          Returns the method supported by this factory and used to register the factory.
 Serializer makeSerializer(OutputFormat format)
          Create a new serializer based on the OutputFormat.
 Serializer makeSerializer(java.io.OutputStream output, OutputFormat format)
          Create a new serializer, based on the OutputFormat and using the output byte stream and the encoding specified in the output format.
 Serializer makeSerializer(java.io.Writer writer, OutputFormat format)
          Create a new serializer, based on the OutputFormat and using the writer as the output character stream.
 
Methods inherited from class org.enhydra.apache.xml.serialize.SerializerFactory
getSerializerFactory, registerSerializerFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializerFactoryImpl

SerializerFactoryImpl(java.lang.String method)
Method Detail

makeSerializer

public Serializer makeSerializer(OutputFormat format)
Description copied from class: SerializerFactory
Create a new serializer based on the OutputFormat. If this method is used to create the serializer, the Serializer.setOutputByteStream(java.io.OutputStream) or Serializer.setOutputCharStream(java.io.Writer) methods must be called before serializing a document.

Specified by:
makeSerializer in class SerializerFactory

makeSerializer

public Serializer makeSerializer(java.io.Writer writer,
                                 OutputFormat format)
Description copied from class: SerializerFactory
Create a new serializer, based on the OutputFormat and using the writer as the output character stream. If this method is used, the encoding property will be ignored.

Specified by:
makeSerializer in class SerializerFactory

makeSerializer

public Serializer makeSerializer(java.io.OutputStream output,
                                 OutputFormat format)
                          throws java.io.UnsupportedEncodingException
Description copied from class: SerializerFactory
Create a new serializer, based on the OutputFormat and using the output byte stream and the encoding specified in the output format.

Specified by:
makeSerializer in class SerializerFactory
Throws:
java.io.UnsupportedEncodingException - The specified encoding is not supported

getSupportedMethod

protected java.lang.String getSupportedMethod()
Description copied from class: SerializerFactory
Returns the method supported by this factory and used to register the factory. This call is required so factories can be added from a properties file by knowing only the class name. This method is protected, it is only required by this class but must be implemented in derived classes.

Specified by:
getSupportedMethod in class SerializerFactory


Copyright © 1999 The Apache Software Foundation. All Rights reserved.