_method = method; if ( ! _method.equals( Method.XML ) && ! _method.equals( Method.HTML ) && ! _method.equals( Method.XHTML ) && ! _method.equals( Method.TEXT ) ) { String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.SERIALIZER_DOMAIN, "MethodNotSupported", new Object[]{method}); throw new IllegalArgumentException(msg); }
if ( _method.equals( Method.XML ) ) { return new XMLSerializer( format ); } else if ( _method.equals( Method.HTML ) ) { return new HTMLSerializer( format ); } else if ( _method.equals( Method.XHTML ) ) { return new XHTMLSerializer( format ); } else if ( _method.equals( Method.TEXT ) ) { return new TextSerializer(); } else { String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.SERIALIZER_DOMAIN, "MethodNotSupported", new Object[]{_method}); throw new IllegalStateException(msg); }
return _method;
Serializer serializer; serializer = getSerializer( format ); serializer.setOutputFormat( format ); return serializer;
Serializer serializer; serializer = getSerializer( format ); serializer.setOutputCharStream( writer ); return serializer;
Serializer serializer; serializer = getSerializer( format ); serializer.setOutputByteStream( output ); return serializer;