1 |
/* ZipInputStream.java -- |
/* ZipInputStream.java -- |
2 |
Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. |
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
41 |
import java.io.EOFException; |
import java.io.EOFException; |
42 |
import java.io.IOException; |
import java.io.IOException; |
43 |
import java.io.InputStream; |
import java.io.InputStream; |
44 |
|
import java.io.UnsupportedEncodingException; |
45 |
|
|
46 |
/** |
/** |
47 |
* This is a FilterInputStream that reads the files in an zip archive |
* This is a FilterInputStream that reads the files in an zip archive |
172 |
|
|
173 |
byte[] buffer = new byte[nameLen]; |
byte[] buffer = new byte[nameLen]; |
174 |
readFully(buffer); |
readFully(buffer); |
175 |
String name = new String(buffer); |
String name; |
176 |
|
try |
177 |
|
{ |
178 |
|
name = new String(buffer, "UTF-8"); |
179 |
|
} |
180 |
|
catch (UnsupportedEncodingException uee) |
181 |
|
{ |
182 |
|
throw new AssertionError(uee); |
183 |
|
} |
184 |
|
|
185 |
entry = createZipEntry(name); |
entry = createZipEntry(name); |
186 |
entryAtEOF = false; |
entryAtEOF = false; |