Java Doc for ZipEntry.java in  » 6.0-JDK-Core » Collections-Jar-Zip-Logging-regex » java » util » zip » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » Collections Jar Zip Logging regex » java.util.zip 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.zip.ZipEntry

All known Subclasses:   java.util.jar.JarEntry,
ZipEntry
public class ZipEntry implements ZipConstants,Cloneable(Code)
This class is used to represent a ZIP file entry.
version:
   1.46, 05/05/07
author:
   David Connelly


Field Summary
final public static  intDEFLATED
     Compression method for compressed (deflated) entries.
final public static  intSTORED
     Compression method for uncompressed entries.
 Stringcomment
    
 longcrc
    
 longcsize
    
 byte[]extra
    
 intmethod
    
 Stringname
    
 longsize
    
 longtime
    

Constructor Summary
public  ZipEntry(String name)
     Creates a new zip entry with the specified name.
public  ZipEntry(ZipEntry e)
     Creates a new zip entry with fields taken from the specified zip entry.
 ZipEntry(String name, long jzentry)
    
 ZipEntry(long jzentry)
    

Method Summary
public  Objectclone()
     Returns a copy of this entry.
public  StringgetComment()
     Returns the comment string for the entry, or null if none.
public  longgetCompressedSize()
     Returns the size of the compressed entry data, or -1 if not known.
public  longgetCrc()
     Returns the CRC-32 checksum of the uncompressed entry data, or -1 if not known.
public  byte[]getExtra()
     Returns the extra field data for the entry, or null if none.
public  intgetMethod()
     Returns the compression method of the entry, or -1 if not specified.
public  StringgetName()
     Returns the name of the entry.
public  longgetSize()
     Returns the uncompressed size of the entry data, or -1 if not known.
public  longgetTime()
     Returns the modification time of the entry, or -1 if not specified.
public  inthashCode()
     Returns the hash code value for this entry.
public  booleanisDirectory()
     Returns true if this is a directory entry.
public  voidsetComment(String comment)
     Sets the optional comment string for the entry.
public  voidsetCompressedSize(long csize)
     Sets the size of the compressed entry data.
public  voidsetCrc(long crc)
     Sets the CRC-32 checksum of the uncompressed entry data.
public  voidsetExtra(byte[] extra)
     Sets the optional extra field data for the entry.
public  voidsetMethod(int method)
     Sets the compression method for the entry.
public  voidsetSize(long size)
     Sets the uncompressed size of the entry data.
public  voidsetTime(long time)
     Sets the modification time of the entry.
public  StringtoString()
     Returns a string representation of the ZIP entry.

Field Detail
DEFLATED
final public static int DEFLATED(Code)
Compression method for compressed (deflated) entries.



STORED
final public static int STORED(Code)
Compression method for uncompressed entries.



comment
String comment(Code)



crc
long crc(Code)



csize
long csize(Code)



extra
byte[] extra(Code)



method
int method(Code)



name
String name(Code)



size
long size(Code)



time
long time(Code)




Constructor Detail
ZipEntry
public ZipEntry(String name)(Code)
Creates a new zip entry with the specified name.
Parameters:
  name - the entry name
exception:
  NullPointerException - if the entry name is null
exception:
  IllegalArgumentException - if the entry name is longer than0xFFFF bytes



ZipEntry
public ZipEntry(ZipEntry e)(Code)
Creates a new zip entry with fields taken from the specified zip entry.
Parameters:
  e - a zip Entry object



ZipEntry
ZipEntry(String name, long jzentry)(Code)



ZipEntry
ZipEntry(long jzentry)(Code)




Method Detail
clone
public Object clone()(Code)
Returns a copy of this entry.



getComment
public String getComment()(Code)
Returns the comment string for the entry, or null if none. the comment string for the entry, or null if none
See Also:   ZipEntry.setComment(String)



getCompressedSize
public long getCompressedSize()(Code)
Returns the size of the compressed entry data, or -1 if not known. In the case of a stored entry, the compressed size will be the same as the uncompressed size of the entry. the size of the compressed entry data, or -1 if not known
See Also:   ZipEntry.setCompressedSize(long)



getCrc
public long getCrc()(Code)
Returns the CRC-32 checksum of the uncompressed entry data, or -1 if not known. the CRC-32 checksum of the uncompressed entry data, or -1 ifnot known
See Also:   ZipEntry.setCrc(long)



getExtra
public byte[] getExtra()(Code)
Returns the extra field data for the entry, or null if none. the extra field data for the entry, or null if none
See Also:   ZipEntry.setExtra(byte[])



getMethod
public int getMethod()(Code)
Returns the compression method of the entry, or -1 if not specified. the compression method of the entry, or -1 if not specified
See Also:   ZipEntry.setMethod(int)



getName
public String getName()(Code)
Returns the name of the entry. the name of the entry



getSize
public long getSize()(Code)
Returns the uncompressed size of the entry data, or -1 if not known. the uncompressed size of the entry data, or -1 if not known
See Also:   ZipEntry.setSize(long)



getTime
public long getTime()(Code)
Returns the modification time of the entry, or -1 if not specified. the modification time of the entry, or -1 if not specified
See Also:   ZipEntry.setTime(long)



hashCode
public int hashCode()(Code)
Returns the hash code value for this entry.



isDirectory
public boolean isDirectory()(Code)
Returns true if this is a directory entry. A directory entry is defined to be one whose name ends with a '/'. true if this is a directory entry



setComment
public void setComment(String comment)(Code)
Sets the optional comment string for the entry.
Parameters:
  comment - the comment string
exception:
  IllegalArgumentException - if the length of the specifiedcomment string is greater than 0xFFFF bytes
See Also:   ZipEntry.getComment()



setCompressedSize
public void setCompressedSize(long csize)(Code)
Sets the size of the compressed entry data.
Parameters:
  csize - the compressed size to set to
See Also:   ZipEntry.getCompressedSize()



setCrc
public void setCrc(long crc)(Code)
Sets the CRC-32 checksum of the uncompressed entry data.
Parameters:
  crc - the CRC-32 value
exception:
  IllegalArgumentException - if the specified CRC-32 value isless than 0 or greater than 0xFFFFFFFF
See Also:   ZipEntry.getCrc()



setExtra
public void setExtra(byte[] extra)(Code)
Sets the optional extra field data for the entry.
Parameters:
  extra - the extra field data bytes
exception:
  IllegalArgumentException - if the length of the specifiedextra field data is greater than 0xFFFF bytes
See Also:   ZipEntry.getExtra()



setMethod
public void setMethod(int method)(Code)
Sets the compression method for the entry.
Parameters:
  method - the compression method, either STORED or DEFLATED
exception:
  IllegalArgumentException - if the specified compressionmethod is invalid
See Also:   ZipEntry.getMethod()



setSize
public void setSize(long size)(Code)
Sets the uncompressed size of the entry data.
Parameters:
  size - the uncompressed size in bytes
exception:
  IllegalArgumentException - if the specified size is lessthan 0 or greater than 0xFFFFFFFF bytes
See Also:   ZipEntry.getSize()



setTime
public void setTime(long time)(Code)
Sets the modification time of the entry.
Parameters:
  time - the entry modification time in number of millisecondssince the epoch
See Also:   ZipEntry.getTime()



toString
public String toString()(Code)
Returns a string representation of the ZIP entry.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.