src/share/classes/java/util/zip/ZipInputStream.java
Print this page
rev 3975 : 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
@@ -28,10 +28,11 @@
import java.io.InputStream;
import java.io.IOException;
import java.io.EOFException;
import java.io.PushbackInputStream;
import java.nio.charset.Charset;
+import java.nio.charset.StandardCharset;
import static java.util.zip.ZipConstants64.*;
/**
* This class implements an input stream filter for reading files in the
* ZIP file format. Includes support for both compressed and uncompressed
@@ -73,11 +74,11 @@
* decode the entry names.
*
* @param in the actual input stream
*/
public ZipInputStream(InputStream in) {
- this(in, Charset.forName("UTF-8"));
+ this(in, StandardCharset.UTF_8);
}
/**
* Creates a new ZIP input stream.
*