Java Doc for ZipEntry.java in  » Build » ANT » org » apache » tools » zip » Java Source Code / Java DocumentationJava Source Code and Java Documentation

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 geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Build » ANT » org.apache.tools.zip 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.zip.ZipEntry
      org.apache.tools.zip.ZipEntry

ZipEntry
public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable(Code)
Extension that adds better handling of extra fields and provides access to the internal and external file attributes.



Constructor Summary
public  ZipEntry(String name)
     Creates a new zip entry with the specified name.
public  ZipEntry(java.util.zip.ZipEntry entry)
     Creates a new zip entry with fields taken from the specified zip entry.
public  ZipEntry(ZipEntry entry)
     Creates a new zip entry with fields taken from the specified zip entry.
protected  ZipEntry()
    

Method Summary
public  voidaddExtraField(ZipExtraField ze)
     Adds an extra fields - replacing an already present extra field of the same type.
public  Objectclone()
     Overwrite clone.
public  booleanequals(Object o)
     The equality method.
public  byte[]getCentralDirectoryExtra()
     Retrieves the extra data for the central directory.
public  longgetExternalAttributes()
     Retrieves the external file attributes.
public  ZipExtraField[]getExtraFields()
     Retrieves extra fields.
public  intgetInternalAttributes()
     Retrieves the internal file attributes.
public  byte[]getLocalFileDataExtra()
     Retrieves the extra data for the local file data.
public  StringgetName()
     Get the name of the entry.
public  intgetPlatform()
     Platform specification to put into the "version made by" part of the central file header.
public  intgetUnixMode()
     Unix permission.
public  inthashCode()
     Get the hashCode of the entry.
public  booleanisDirectory()
    
public  voidremoveExtraField(ZipShort type)
     Remove an extra fields.
public  voidsetComprSize(long size)
     Make this class work in JDK 1.1 like a 1.2 class.
public  voidsetExternalAttributes(long value)
     Sets the external file attributes.
public  voidsetExtra(byte[] extra)
     Throws an Exception if extra data cannot be parsed into extra fields.
protected  voidsetExtra()
     Unfortunately java.util.zip.ZipOutputStreamjava.util.zip.ZipOutputStream seems to access the extra data directly, so overriding getExtra doesn't help - we need to modify super's data directly.
public  voidsetExtraFields(ZipExtraField[] fields)
     Replaces all currently attached extra fields with the new array.
public  voidsetInternalAttributes(int value)
     Sets the internal file attributes.
protected  voidsetName(String name)
     Set the name of the entry.
protected  voidsetPlatform(int platform)
     Set the platform (UNIX or FAT).
public  voidsetUnixMode(int mode)
     Sets Unix permissions in a way that is understood by Info-Zip's unzip command.


Constructor Detail
ZipEntry
public ZipEntry(String name)(Code)
Creates a new zip entry with the specified name.
Parameters:
  name - the name of the entry
since:
   1.1



ZipEntry
public ZipEntry(java.util.zip.ZipEntry entry) throws ZipException(Code)
Creates a new zip entry with fields taken from the specified zip entry.
Parameters:
  entry - the entry to get fields from
since:
   1.1
throws:
  ZipException - on error



ZipEntry
public ZipEntry(ZipEntry entry) throws ZipException(Code)
Creates a new zip entry with fields taken from the specified zip entry.
Parameters:
  entry - the entry to get fields from
throws:
  ZipException - on error
since:
   1.1



ZipEntry
protected ZipEntry()(Code)

since:
   1.9




Method Detail
addExtraField
public void addExtraField(ZipExtraField ze)(Code)
Adds an extra fields - replacing an already present extra field of the same type.
Parameters:
  ze - an extra field
since:
   1.1



clone
public Object clone()(Code)
Overwrite clone. a cloned copy of this ZipEntry
since:
   1.1



equals
public boolean equals(Object o)(Code)
The equality method. In this case, the implementation returns 'this == o' which is basically the equals method of the Object class.
Parameters:
  o - the object to compare to true if this object is the same as o
since:
   Ant 1.7



getCentralDirectoryExtra
public byte[] getCentralDirectoryExtra()(Code)
Retrieves the extra data for the central directory. the central directory extra data
since:
   1.1



getExternalAttributes
public long getExternalAttributes()(Code)
Retrieves the external file attributes. the external file attributes
since:
   1.1



getExtraFields
public ZipExtraField[] getExtraFields()(Code)
Retrieves extra fields. an array of the extra fields
since:
   1.1



getInternalAttributes
public int getInternalAttributes()(Code)
Retrieves the internal file attributes. the internal file attributes
since:
   1.1



getLocalFileDataExtra
public byte[] getLocalFileDataExtra()(Code)
Retrieves the extra data for the local file data. the extra data for local file
since:
   1.1



getName
public String getName()(Code)
Get the name of the entry. the entry name
since:
   1.9



getPlatform
public int getPlatform()(Code)
Platform specification to put into the "version made by" part of the central file header. 0 (MS-DOS FAT) unless ZipEntry.setUnixMode setUnixModehas been called, in which case 3 (Unix) will be returned.
since:
   Ant 1.5.2



getUnixMode
public int getUnixMode()(Code)
Unix permission. the unix permissions
since:
   Ant 1.6



hashCode
public int hashCode()(Code)
Get the hashCode of the entry. This uses the name as the hashcode. a hashcode.
since:
   Ant 1.7



isDirectory
public boolean isDirectory()(Code)
Is this entry a directory? true if the entry is a directory
since:
   1.10



removeExtraField
public void removeExtraField(ZipShort type)(Code)
Remove an extra fields.
Parameters:
  type - the type of extra field to remove
since:
   1.1



setComprSize
public void setComprSize(long size)(Code)
Make this class work in JDK 1.1 like a 1.2 class.

This either stores the size for later usage or invokes setCompressedSize via reflection.


Parameters:
  size - the size to use
since:
   1.2



setExternalAttributes
public void setExternalAttributes(long value)(Code)
Sets the external file attributes.
Parameters:
  value - an long value
since:
   1.1



setExtra
public void setExtra(byte[] extra) throws RuntimeException(Code)
Throws an Exception if extra data cannot be parsed into extra fields.
Parameters:
  extra - an array of bytes to be parsed into extra fields
throws:
  RuntimeException - if the bytes cannot be parsed
since:
   1.1
throws:
  RuntimeException - on error



setExtra
protected void setExtra()(Code)
Unfortunately java.util.zip.ZipOutputStreamjava.util.zip.ZipOutputStream seems to access the extra data directly, so overriding getExtra doesn't help - we need to modify super's data directly.
since:
   1.1



setExtraFields
public void setExtraFields(ZipExtraField[] fields)(Code)
Replaces all currently attached extra fields with the new array.
Parameters:
  fields - an array of extra fields
since:
   1.1



setInternalAttributes
public void setInternalAttributes(int value)(Code)
Sets the internal file attributes.
Parameters:
  value - an int value
since:
   1.1



setName
protected void setName(String name)(Code)
Set the name of the entry.
Parameters:
  name - the name to use



setPlatform
protected void setPlatform(int platform)(Code)
Set the platform (UNIX or FAT).
Parameters:
  platform - an int value - 0 is FAT, 3 is UNIX
since:
   1.9



setUnixMode
public void setUnixMode(int mode)(Code)
Sets Unix permissions in a way that is understood by Info-Zip's unzip command.
Parameters:
  mode - an int value
since:
   Ant 1.5.2



Fields inherited from java.util.zip.ZipEntry
final public static int DEFLATED(Code)(Java Doc)
final public static int STORED(Code)(Java Doc)

Methods inherited from java.util.zip.ZipEntry
public Object clone()(Code)(Java Doc)
public String getComment()(Code)(Java Doc)
public long getCompressedSize()(Code)(Java Doc)
public long getCrc()(Code)(Java Doc)
public byte[] getExtra()(Code)(Java Doc)
public int getMethod()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public long getSize()(Code)(Java Doc)
public long getTime()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public boolean isDirectory()(Code)(Java Doc)
public void setComment(String comment)(Code)(Java Doc)
public void setCompressedSize(long csize)(Code)(Java Doc)
public void setCrc(long crc)(Code)(Java Doc)
public void setExtra(byte[] extra)(Code)(Java Doc)
public void setMethod(int method)(Code)(Java Doc)
public void setSize(long size)(Code)(Java Doc)
public void setTime(long time)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

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.