org.at4j.zip.extattrs
Class NtfsExternalFileAttributes

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

public class NtfsExternalFileAttributes
extends Object
implements ZipExternalFileAttributes

This object represents the external file attributes for NTFS files. It contains a set of NtfsFileAttributes.

Since:
1.0
Author:
Karl Gustafsson

Field Summary
static NtfsExternalFileAttributes DEFAULT_DIRECTORY_ATTRIBUTES
          The default directory attributes (archive).
static NtfsExternalFileAttributes DEFAULT_FILE_ATTRIBUTES
          The default file attributes (archive).
 
Constructor Summary
NtfsExternalFileAttributes(NtfsFileAttributes... attributes)
          Create a new NTFS external file attributes object.
NtfsExternalFileAttributes(Set<NtfsFileAttributes> s)
          Create a new NTFS external file attributes object.
 
Method Summary
 boolean equals(Object o)
           
 EnumSet<NtfsFileAttributes> getAttributes()
          Get (a copy of) the attributes for the entity.
 UnsignedInteger getEncodedValue()
          Get the encoded value for this set of attributes as it is stored in the Zip file.
 ZipVersionMadeBy getVersionMadeBy()
          Get the version of the Zip software used to create these external file attributes.
 int hashCode()
           
 boolean isSet(NtfsFileAttributes attr)
          Is the specified attribute set in this object?
 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 NtfsExternalFileAttributes DEFAULT_FILE_ATTRIBUTES
The default file attributes (archive).


DEFAULT_DIRECTORY_ATTRIBUTES

public static final NtfsExternalFileAttributes DEFAULT_DIRECTORY_ATTRIBUTES
The default directory attributes (archive).

Constructor Detail

NtfsExternalFileAttributes

public NtfsExternalFileAttributes(NtfsFileAttributes... attributes)
Create a new NTFS external file attributes object.

Parameters:
attributes - The attributes for the entity.

NtfsExternalFileAttributes

public NtfsExternalFileAttributes(Set<NtfsFileAttributes> s)
Create a new NTFS external file attributes object.

Parameters:
s - The attributes for the entity.
Method Detail

getAttributes

public EnumSet<NtfsFileAttributes> getAttributes()
Get (a copy of) the attributes for the entity.

Returns:
The attributes for the entity.

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.

isSet

public boolean isSet(NtfsFileAttributes attr)
Is the specified attribute set in this object?

Parameters:
attr - The attribute to test for.
Returns:
true if the attribute is set in this object.

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()
Get the encoded value for this set of attributes as it is stored in the Zip file.

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