1.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamWriterBufferProcessor.java Thu Apr 04 19:05:24 2013 -0700 1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamWriterBufferProcessor.java Tue Apr 09 14:51:13 2013 +0100 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -28,11 +28,13 @@ 1.11 import com.sun.xml.internal.stream.buffer.AbstractProcessor; 1.12 import com.sun.xml.internal.stream.buffer.XMLStreamBuffer; 1.13 1.14 +import java.io.IOException; 1.15 import java.util.Collections; 1.16 import java.util.HashSet; 1.17 import java.util.Map; 1.18 import java.util.Set; 1.19 1.20 +import com.sun.xml.internal.org.jvnet.staxex.Base64Data; 1.21 import com.sun.xml.internal.org.jvnet.staxex.XMLStreamWriterEx; 1.22 1.23 import javax.xml.stream.XMLStreamException; 1.24 @@ -359,7 +361,16 @@ 1.25 } 1.26 case STATE_TEXT_AS_OBJECT: { 1.27 final CharSequence c = (CharSequence)readContentObject(); 1.28 - writer.writeCharacters(c.toString()); 1.29 + if (c instanceof Base64Data) { 1.30 + try { 1.31 + Base64Data bd = (Base64Data)c; 1.32 + bd.writeTo(writer); 1.33 + } catch (IOException e) { 1.34 + throw new XMLStreamException(e); 1.35 + } 1.36 + } else { 1.37 + writer.writeCharacters(c.toString()); 1.38 + } 1.39 break; 1.40 } 1.41 case STATE_COMMENT_AS_CHAR_ARRAY_SMALL: {