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

Print this page

        

*** 1,7 **** /* ! * Copyright 1995-2005 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this --- 1,7 ---- /* ! * Copyright 1995-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this
*** 142,156 **** /** * Sets the uncompressed size of the entry data. * @param size the uncompressed size in bytes * @exception IllegalArgumentException if the specified size is less ! * than 0 or greater than 0xFFFFFFFF bytes * @see #getSize() */ public void setSize(long size) { ! if (size < 0 || size > 0xFFFFFFFFL) { throw new IllegalArgumentException("invalid entry size"); } this.size = size; } --- 142,158 ---- /** * Sets the uncompressed size of the entry data. * @param size the uncompressed size in bytes * @exception IllegalArgumentException if the specified size is less ! * than 0, is greater than 0xFFFFFFFF when ! * <a href="package-summary.html#zip64">ZIP64 format</a> is not supported, ! * or is less than 0 when ZIP64 is supported * @see #getSize() */ public void setSize(long size) { ! if (size < 0) { throw new IllegalArgumentException("invalid entry size"); } this.size = size; }