Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.apache.xml.serialize;
 
 import java.io.Writer;

Deprecated:
 
 final class SerializerFactoryImpl extends SerializerFactory
  private String _method;
  {
    this._method = paramString;
    if ((!this._method.equals("xml")) && (!this._method.equals("html")) && (!this._method.equals("xhtml")) && (!this._method.equals("text")))
    {
      String str = DOMMessageFormatter.formatMessage("http://apache.org/xml/serializer""MethodNotSupported"new Object[] { paramString });
      throw new IllegalArgumentException(str);
    }
  }
  public Serializer makeSerializer(OutputFormat paramOutputFormat)
  {
    Serializer localSerializer = getSerializer(paramOutputFormat);
    localSerializer.setOutputFormat(paramOutputFormat);
    return localSerializer;
  }
  public Serializer makeSerializer(Writer paramWriterOutputFormat paramOutputFormat)
  {
    Serializer localSerializer = getSerializer(paramOutputFormat);
    localSerializer.setOutputCharStream(paramWriter);
    return localSerializer;
  }
  public Serializer makeSerializer(OutputStream paramOutputStreamOutputFormat paramOutputFormat)
  {
    Serializer localSerializer = getSerializer(paramOutputFormat);
    localSerializer.setOutputByteStream(paramOutputStream);
    return localSerializer;
  }
  private Serializer getSerializer(OutputFormat paramOutputFormat)
  {
    if (this._method.equals("xml"))
      return new XMLSerializer(paramOutputFormat);
    if (this._method.equals("html"))
      return new HTMLSerializer(paramOutputFormat);
    if (this._method.equals("xhtml"))
      return new XHTMLSerializer(paramOutputFormat);
    if (this._method.equals("text"))
      return new TextSerializer();
    String str = DOMMessageFormatter.formatMessage("http://apache.org/xml/serializer""MethodNotSupported"new Object[] { this._method });
    throw new IllegalStateException(str);
  }
  protected String getSupportedMethod()
  {
    return this._method;
  }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/thirdparty-all.jar
 * Qualified Name:     org.apache.xml.serialize.SerializerFactoryImpl
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X