< prev index next >

src/java.base/share/classes/jdk/internal/util/xml/PropertiesDefaultHandler.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -24,10 +24,11 @@
  */
 
 package jdk.internal.util.xml;
 
 import java.io.*;
+import java.nio.charset.Charset;
 import java.util.InvalidPropertiesFormatException;
 import java.util.Map.Entry;
 import java.util.Properties;
 import jdk.internal.org.xml.sax.Attributes;
 import jdk.internal.org.xml.sax.InputSource;

@@ -92,15 +93,15 @@
          * can read" + " versions " + EXTERNAL_XML_VERSION + " or older. You" +
          * " may need to install a newer version of JDK.");
          */
     }
 
-    public void store(Properties props, OutputStream os, String comment, String encoding)
+    public void store(Properties props, OutputStream os, String comment, Charset charset)
         throws IOException
     {
         try {
-            XMLStreamWriter writer = new XMLStreamWriterImpl(os, encoding);
+            XMLStreamWriter writer = new XMLStreamWriterImpl(os, charset);
             writer.writeStartDocument();
             writer.writeDTD(PROPS_DTD_DECL);
             writer.writeStartElement(ELEMENT_ROOT);
             if (comment != null && comment.length() > 0) {
                 writer.writeStartElement(ELEMENT_COMMENT);
< prev index next >