/[classpath]/classpath/java/util/zip/ZipFile.java
ViewVC logotype

Diff of /classpath/java/util/zip/ZipFile.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by mark, Sun Oct 27 12:53:04 2002 UTC revision 1.9 by mark, Thu Oct 31 22:14:47 2002 UTC
# Line 106  public class ZipFile implements ZipConst Line 106  public class ZipFile implements ZipConst
106    /**    /**
107     * Opens a Zip file reading the given File in the given mode.     * Opens a Zip file reading the given File in the given mode.
108     *     *
109     * If the OPEN_DELETE mode is specified, the zip file will be deleted at some time moment     * If the OPEN_DELETE mode is specified, the zip file will be deleted at
110     * after it is opened. It will be deleted before the zip file is closed or the Virtual Machine     * some time moment after it is opened. It will be deleted before the zip
111     * exits.     * file is closed or the Virtual Machine exits.
112     *     *
113     * The contents of the zip file will be accessible until it is closed.     * The contents of the zip file will be accessible until it is closed.
114     *     *
# Line 125  public class ZipFile implements ZipConst Line 125  public class ZipFile implements ZipConst
125    {    {
126      if ((mode & OPEN_DELETE) != 0)      if ((mode & OPEN_DELETE) != 0)
127        {        {
128          throw new IllegalArgumentException("OPEN_DELETE mode not supported yet in java.util.zip.ZipFile");          throw new IllegalArgumentException
129              ("OPEN_DELETE mode not supported yet in java.util.zip.ZipFile");
130        }        }
131      this.raf = new RandomAccessFile(file, "r");      this.raf = new RandomAccessFile(file, "r");
132      this.name = file.getName();      this.name = file.getName();
# Line 137  public class ZipFile implements ZipConst Line 138  public class ZipFile implements ZipConst
138     * @exception IOException if a i/o error occured.     * @exception IOException if a i/o error occured.
139     * @exception EOFException if the file ends prematurely     * @exception EOFException if the file ends prematurely
140     */     */
141    private final int readLeShort(DataInput di) throws IOException {    private final int readLeShort(DataInput di) throws IOException
142      {
143      byte[] b = new byte[2];      byte[] b = new byte[2];
144      di.readFully(b);      di.readFully(b);
145      return (b[0] & 0xff) | (b[1] & 0xff) << 8;      return (b[0] & 0xff) | (b[1] & 0xff) << 8;
# Line 148  public class ZipFile implements ZipConst Line 150  public class ZipFile implements ZipConst
150     * @exception IOException if a i/o error occured.     * @exception IOException if a i/o error occured.
151     * @exception EOFException if the file ends prematurely     * @exception EOFException if the file ends prematurely
152     */     */
153    private final int readLeInt(DataInput di) throws IOException {    private final int readLeInt(DataInput di) throws IOException
154      {
155      byte[] b = new byte[4];      byte[] b = new byte[4];
156      di.readFully(b);      di.readFully(b);
157      return ((b[0] & 0xff) | (b[1] & 0xff) << 8)      return ((b[0] & 0xff) | (b[1] & 0xff) << 8)

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26