org.jasig.portal.serialize
Class SerializerFactoryImpl

java.lang.Object
  extended by org.jasig.portal.serialize.SerializerFactory
      extended by org.jasig.portal.serialize.SerializerFactoryImpl

final class SerializerFactoryImpl
extends SerializerFactory

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

Version:
$Revision: 1.2 $ $Date: 2003/04/04 00:46:43 $
Author:
Scott Boag, Assaf Arkin

Field Summary
private  java.lang.String _method
           
 
Fields inherited from class org.jasig.portal.serialize.SerializerFactory
FactoriesProperty
 
Constructor Summary
SerializerFactoryImpl(java.lang.String method)
           
 
Method Summary
private  Serializer getSerializer(OutputFormat format)
           
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.jasig.portal.serialize.SerializerFactory
getSerializerFactory, registerSerializerFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_method

private java.lang.String _method
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

getSerializer

private Serializer getSerializer(OutputFormat format)

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