1 /* 2 * Copyright 2003, 2004 The Apache Software Foundation 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 16 */ 17 package org.apache.ws.jaxme; 18 19 import java.io.Writer; 20 21 import javax.xml.bind.JAXBException; 22 23 import org.apache.ws.jaxme.impl.JMMarshallerImpl; 24 25 26 /** <p>A simple serializer for XML documents.</p> 27 * 28 * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a> 29 */ 30 public interface XMLWriter extends org.xml.sax.ContentHandler { 31 /** <p>Initializes the XMLWriter by setting the Marshaller which created it.</p> 32 */ 33 public void init(JMMarshallerImpl pMarshaller) throws JAXBException; 34 35 /** <p>Sets the {@link Writer} to which the Marshaller ought to write.</p> 36 */ 37 public void setWriter(Writer pWriter) throws JAXBException; 38 39 /** <p>Returns whether the XMLWriter can encode the character 40 * <code>c</code> without an escape sequence like &#ddd;.</p> 41 */ 42 public boolean canEncode(char c); 43 } 44