< prev index next >
src/java.base/share/classes/java/util/zip/ZipOutputStream.java
Print this page
rev 57116 : 8234147: Avoid looking up standard charsets in core libraries
Reviewed-by: alanb
@@ -26,15 +26,15 @@
package java.util.zip;
import java.io.OutputStream;
import java.io.IOException;
import java.nio.charset.Charset;
-import java.nio.charset.StandardCharsets;
import java.util.Vector;
import java.util.HashSet;
import static java.util.zip.ZipConstants64.*;
import static java.util.zip.ZipUtils.*;
+import sun.nio.cs.UTF_8;
import sun.security.action.GetPropertyAction;
/**
* This class implements an output stream filter for writing files in the
* ZIP file format. Includes support for both compressed and uncompressed
@@ -114,11 +114,11 @@
* to encode the entry names and comments.
*
* @param out the actual output stream
*/
public ZipOutputStream(OutputStream out) {
- this(out, StandardCharsets.UTF_8);
+ this(out, UTF_8.INSTANCE);
}
/**
* Creates a new ZIP output stream.
*
< prev index next >