home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / util / jar / JarEntry.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  1.7 KB  |  60 lines

  1. /*
  2.  * @(#)JarEntry.java    1.7 98/03/18
  3.  *
  4.  * Copyright 1997, 1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.util.jar;
  16.  
  17. import java.util.zip.ZipEntry;
  18. import java.security.Identity;
  19.  
  20. /**
  21.  * This class is used to represent a JAR file entry.
  22.  */
  23. public
  24. class JarEntry extends ZipEntry {
  25.     Attributes attr;
  26.     Identity[] ids;
  27.  
  28.     /**
  29.      * Creates a new <code>JarEntry</code> for the specified JAR file
  30.      * entry name.
  31.      *
  32.      * @param the JAR file entry name
  33.      * @exception NullPointerException if the entry name is <code>null</code>
  34.      * @exception IllegalArgumentException if the entry name is longer than
  35.      *            0xFFFF bytes.
  36.      */
  37.     public JarEntry(String name) {
  38.     super(name);
  39.     }
  40.  
  41.     /**
  42.      * Returns the <code>Manifest</code> <code>Attributes</code> for this
  43.      * entry, or <code>null</code> if none.
  44.      */
  45.     public Attributes getAttributes() {
  46.     return attr;
  47.     }
  48.  
  49.     /**
  50.      * Returns the <code>Identity</code> objects for this entry, or
  51.      * <code>null</code> if none. This method can only be called once
  52.      * the <code>JarEntry</code> has been completely verified by reading
  53.      * from the entry input stream until the end of the stream has been
  54.      * reached. Otherwise, this method will return <code>null</code>
  55.      */
  56.     public Identity[] getIdentities() {
  57.     return ids;
  58.     }
  59. }
  60.