325N/Apublic /*to make unit tests happy*/ final class MarshallerImpl extends AbstractMarshallerImpl implements ValidationEventHandler
325N/A setEventHandler(this);
325N/A } catch (JAXBException e) {
325N/A public void marshal(Object obj, OutputStream out, NamespaceContext inscopeNamespace) throws JAXBException {
325N/A write(obj, XMLStreamWriterOutput.create(writer,context), new StAXPostInitAction(writer,serializer));
325N/A } catch (IOException e) {
325N/A throw new MarshalException(e);
325N/A protected final <T> void write(Name rootTagName, JaxBeanInfo<T> bi, T obj, XmlOutput out,Runnable postInitAction) throws JAXBException {
325N/A } catch( SAXException e ) {
325N/A throw new MarshalException(e);
325N/A } catch (IOException e) {
325N/A throw new MarshalException(e);
325N/A } catch (XMLStreamException e) {
325N/A throw new MarshalException(e);
325N/A private void write(Object obj, XmlOutput out, Runnable postInitAction) throws JAXBException {
325N/A public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws SAXException, IOException, XMLStreamException {
325N/A public void endDocument(boolean fragment) throws SAXException, IOException, XMLStreamException {
325N/A super.endDocument(false);
325N/A } catch( SAXException e ) {
325N/A throw new MarshalException(e);
325N/A } catch (IOException e) {
325N/A throw new MarshalException(e);
325N/A } catch (XMLStreamException e) {
325N/A throw new MarshalException(e);
325N/A } catch (IOException e) {
325N/A } catch (IOException e) {
325N/A private void prewrite(XmlOutput out, boolean fragment, Runnable postInitAction) throws IOException, SAXException, XMLStreamException {
325N/A return escapeHandler;
325N/A if(!(w instanceof BufferedWriter))
325N/A w = new BufferedWriter(w);
325N/A toBeFlushed = w;
325N/A if(isFormattedOutput()) {
325N/A if(isFormattedOutput())
325N/A if(c14nSupport)
325N/A return createWriter(
325N/A } catch( UnsupportedEncodingException e ) {
325N/A throw new MarshalException(
325N/A return escapeHandler;
325N/A return prefixMapper;
325N/A return !isFragment();
325N/A return c14nSupport;
325N/A throw new PropertyException(
325N/A throw new PropertyException(
325N/A // com.sun.xml.internal.bind.xmlDeclaration is an alias for JAXB_FRAGMENT
325N/A throw new PropertyException(
325N/A throw new PropertyException(
325N/A throw new IllegalArgumentException();
325N/A throw new IllegalArgumentException();
325N/A return externalListener;
325N/A protected static final String PREFIX_MAPPER = "com.sun.xml.internal.bind.namespacePrefixMapper";
325N/A protected static final String ENCODING_HANDLER = "com.sun.xml.internal.bind.characterEscapeHandler";
325N/A protected static final String ENCODING_HANDLER2 = "com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler";
325N/A protected static final String OBJECT_IDENTITY_CYCLE_DETECTION = "com.sun.xml.internal.bind.objectIdentitityCycleDetection";