@Override public DocumentHandler getSerializer(final Writer output) throws IOException { Serializer serializer; DocumentHandler docHandler; serializer = getSerializer(); serializer.setOutputCharStream(output); docHandler = serializer.asDocumentHandler(); if (docHandler == null) { throw new RuntimeException( Messages.format("conf.serializerNotSaxCapable", serializer.getClass().getName())); } return docHandler; }
@Override public DocumentHandler getSerializer(final OutputStream output) throws IOException { Serializer serializer; DocumentHandler docHandler; serializer = getSerializer(); serializer.setOutputByteStream(output); docHandler = serializer.asDocumentHandler(); if (docHandler == null) { throw new RuntimeException( Messages.format("conf.serializerNotSaxCapable", serializer.getClass().getName())); } return docHandler; }
/** * @see org.castor.xml.InternalContext#getSerializer(java.io.OutputStream) */ public DocumentHandler getSerializer(final OutputStream output) throws IOException { Serializer serializer; DocumentHandler docHandler; serializer = getSerializer(); serializer.setOutputByteStream(output); docHandler = serializer.asDocumentHandler(); if (docHandler == null) { throw new RuntimeException(Messages.format("conf.serializerNotSaxCapable", serializer .getClass().getName())); } return docHandler; }
/** * @see org.castor.xml.InternalContext#getSerializer(java.io.Writer) */ public DocumentHandler getSerializer(final Writer output) throws IOException { Serializer serializer; DocumentHandler docHandler; serializer = getSerializer(); serializer.setOutputCharStream(output); docHandler = serializer.asDocumentHandler(); if (docHandler == null) { throw new RuntimeException(Messages.format("conf.serializerNotSaxCapable", serializer .getClass().getName())); } return docHandler; }