org.at4j.zip.extattrs
Class UnixExternalFileAttributes

java.lang.Object
  extended by org.at4j.zip.extattrs.UnixExternalFileAttributes
All Implemented Interfaces:
ZipExternalFileAttributes

public class UnixExternalFileAttributes
extends Object
implements ZipExternalFileAttributes

This object represents file attributes in a Unix system. It has a field for the type of entity and a field for its access mode.

Instances of this class are immutable.

Since:
1.0
Author:
Karl Gustafsson

Field Summary
static UnixExternalFileAttributes DEFAULT_DIRECTORY_ATTRIBUTES
          Default directory attributes (directory, 0755)
static UnixExternalFileAttributes DEFAULT_FILE_ATTRIBUTES
          Default file attributes (file, 0644)
 
Constructor Summary
UnixExternalFileAttributes(UnixEntityType uet, UnixEntityMode uem)
          Create a UnixFileAttributes object.
 
Method Summary
 boolean equals(Object o)
           
 UnsignedInteger getEncodedValue()
          Get the value of the external file attributes encoded for storing in a Zip file.
 UnixEntityMode getEntityMode()
          Get the entity mode.
 UnixEntityType getEntityType()
          Get the entity type.
 ZipVersionMadeBy getVersionMadeBy()
          Get the version of the Zip software used to create these external file attributes.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_FILE_ATTRIBUTES

public static final UnixExternalFileAttributes DEFAULT_FILE_ATTRIBUTES
Default file attributes (file, 0644)


DEFAULT_DIRECTORY_ATTRIBUTES

public static final UnixExternalFileAttributes DEFAULT_DIRECTORY_ATTRIBUTES
Default directory attributes (directory, 0755)

Constructor Detail

UnixExternalFileAttributes

public UnixExternalFileAttributes(UnixEntityType uet,
                                  UnixEntityMode uem)
Create a UnixFileAttributes object.

Parameters:
uet - The entity type.
uem - The entity's access mode.
Method Detail

getVersionMadeBy

public ZipVersionMadeBy getVersionMadeBy()
Description copied from interface: ZipExternalFileAttributes
Get the version of the Zip software used to create these external file attributes.

Specified by:
getVersionMadeBy in interface ZipExternalFileAttributes
Returns:
The version of the Zip software.

getEntityType

public UnixEntityType getEntityType()
Get the entity type.

Returns:
The entity type.

getEntityMode

public UnixEntityMode getEntityMode()
Get the entity mode.

Returns:
The entity mode.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

getEncodedValue

public UnsignedInteger getEncodedValue()
Description copied from interface: ZipExternalFileAttributes
Get the value of the external file attributes encoded for storing in a Zip file.

Specified by:
getEncodedValue in interface ZipExternalFileAttributes
Returns:
The value of the external file attributes encoded for storing in a Zip file.