jaxp/src/com/sun/xml/internal/stream/writers/XMLStreamWriterImpl.java
changeset 16953 a44e04deb948
parent 12458 d601e4bba306
child 22139 f4b2aa462b46
equal deleted inserted replaced
16416:bcebd3fdefc9 16953:a44e04deb948
    51 
    51 
    52 import com.sun.org.apache.xerces.internal.impl.Constants;
    52 import com.sun.org.apache.xerces.internal.impl.Constants;
    53 import com.sun.org.apache.xerces.internal.impl.PropertyManager;
    53 import com.sun.org.apache.xerces.internal.impl.PropertyManager;
    54 import com.sun.org.apache.xerces.internal.util.NamespaceSupport;
    54 import com.sun.org.apache.xerces.internal.util.NamespaceSupport;
    55 import com.sun.org.apache.xerces.internal.util.SymbolTable;
    55 import com.sun.org.apache.xerces.internal.util.SymbolTable;
       
    56 import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
    56 import com.sun.org.apache.xerces.internal.xni.QName;
    57 import com.sun.org.apache.xerces.internal.xni.QName;
    57 
    58 
    58 import com.sun.xml.internal.stream.util.ReadOnlyIterator;
    59 import com.sun.xml.internal.stream.util.ReadOnlyIterator;
    59 
    60 
    60 /**
    61 /**
   338             else {
   339             else {
   339                 fWriter = new XMLWriter(new OutputStreamWriter(os, encoding));
   340                 fWriter = new XMLWriter(new OutputStreamWriter(os, encoding));
   340                 fEncoder = Charset.forName(encoding).newEncoder();
   341                 fEncoder = Charset.forName(encoding).newEncoder();
   341             }
   342             }
   342         } else {
   343         } else {
   343             encoding = System.getProperty("file.encoding");
   344             encoding = SecuritySupport.getSystemProperty("file.encoding");
   344             if (encoding != null && encoding.equalsIgnoreCase("utf-8")) {
   345             if (encoding != null && encoding.equalsIgnoreCase("utf-8")) {
   345                 fWriter = new UTF8OutputStreamWriter(os);
   346                 fWriter = new UTF8OutputStreamWriter(os);
   346             } else {
   347             } else {
   347                 fWriter = new XMLWriter(new OutputStreamWriter(os));
   348                 fWriter = new XMLWriter(new OutputStreamWriter(os));
   348             }
   349             }