src/share/classes/java/util/zip/ZipOutputStream.java

Print this page
rev 3975 : 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.

*** 26,35 **** --- 26,36 ---- package java.util.zip; import java.io.OutputStream; import java.io.IOException; import java.nio.charset.Charset; + import java.nio.charset.StandardCharset; import java.util.Vector; import java.util.HashSet; import static java.util.zip.ZipConstants64.*; /**
*** 98,108 **** * to encode the entry names and comments. * * @param out the actual output stream */ public ZipOutputStream(OutputStream out) { ! this(out, Charset.forName("UTF-8")); } /** * Creates a new ZIP output stream. * --- 99,109 ---- * to encode the entry names and comments. * * @param out the actual output stream */ public ZipOutputStream(OutputStream out) { ! this(out, StandardCharset.UTF_8); } /** * Creates a new ZIP output stream. *