jdk/src/share/classes/java/util/zip/ZipEntry.java
changeset 2438 21c111b51aa8
parent 2 90ce3da70b43
child 2592 ef26f663a2ba
equal deleted inserted replaced
2436:ae4667371301 2438:21c111b51aa8
     1 /*
     1 /*
     2  * Copyright 1995-2005 Sun Microsystems, Inc.  All Rights Reserved.
     2  * Copyright 1995-2009 Sun Microsystems, Inc.  All Rights Reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Sun designates this
     7  * published by the Free Software Foundation.  Sun designates this
   142 
   142 
   143     /**
   143     /**
   144      * Sets the uncompressed size of the entry data.
   144      * Sets the uncompressed size of the entry data.
   145      * @param size the uncompressed size in bytes
   145      * @param size the uncompressed size in bytes
   146      * @exception IllegalArgumentException if the specified size is less
   146      * @exception IllegalArgumentException if the specified size is less
   147      *            than 0 or greater than 0xFFFFFFFF bytes
   147      *            than 0, is greater than 0xFFFFFFFF when
       
   148      *            <a href="package-summary.html#zip64">ZIP64 format</a> is not supported,
       
   149      *            or is less than 0 when ZIP64 is supported
   148      * @see #getSize()
   150      * @see #getSize()
   149      */
   151      */
   150     public void setSize(long size) {
   152     public void setSize(long size) {
   151         if (size < 0 || size > 0xFFFFFFFFL) {
   153         if (size < 0) {
   152             throw new IllegalArgumentException("invalid entry size");
   154             throw new IllegalArgumentException("invalid entry size");
   153         }
   155         }
   154         this.size = size;
   156         this.size = size;
   155     }
   157     }
   156 
   158