| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.zip.GeneralPurposeBit
public final class GeneralPurposeBit
Parser/encoder for the "general purpose bit" field in ZIP's local file and central directory headers.
| Field Summary | |
|---|---|
| static int | UFT8_NAMES_FLAGIndicates that filenames are written in utf-8. | 
| Constructor Summary | |
|---|---|
| GeneralPurposeBit() | |
| Method Summary | |
|---|---|
|  byte[] | encode()Encodes the set bits in a form suitable for ZIP archives. | 
|  boolean | equals(java.lang.Object o) | 
|  int | hashCode() | 
| static GeneralPurposeBit | parse(byte[] data,
      int offset)Parses the supported flags from the given archive data. | 
|  void | useDataDescriptor(boolean b)whether the current entry will use the data descriptor to store CRC and size information | 
|  void | useEncryption(boolean b)whether the current entry will be encrypted | 
|  boolean | usesDataDescriptor()whether the current entry uses the data descriptor to store CRC and size information | 
|  boolean | usesEncryption()whether the current entry is encrypted | 
|  boolean | usesStrongEncryption()whether the current entry is encrypted using strong encryption | 
|  void | useStrongEncryption(boolean b)whether the current entry will be encrypted using strong encryption | 
|  boolean | usesUTF8ForNames()whether the current entry uses UTF8 for file name and comment. | 
|  void | useUTF8ForNames(boolean b)whether the current entry will use UTF8 for file name and comment. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final int UFT8_NAMES_FLAG
The only reason this is public is that ZipOutputStream.EFS_FLAG was public in several versions of
 Apache Ant and we needed a substitute for it.
| Constructor Detail | 
|---|
public GeneralPurposeBit()
| Method Detail | 
|---|
public boolean usesUTF8ForNames()
public void useUTF8ForNames(boolean b)
public boolean usesDataDescriptor()
public void useDataDescriptor(boolean b)
public boolean usesEncryption()
public void useEncryption(boolean b)
public boolean usesStrongEncryption()
public void useStrongEncryption(boolean b)
public byte[] encode()
public static GeneralPurposeBit parse(byte[] data,
                                      int offset)
data - local file header or a central directory entry.offset - offset at which the general purpose bit startspublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||