org.at4j.zip.extattrs
Class MsDosExternalFileAttributes

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

public class MsDosExternalFileAttributes
extends Object
implements ZipExternalFileAttributes

This object represents the MS DOS file attributes for a Zip entry. It contains a set of MsDosFileAttributes.

Since:
1.0
Author:
Karl Gustafsson
See Also:
MsDosFileAttributes

Field Summary
static MsDosExternalFileAttributes DEFAULT_DIRECTORY_ATTRIBUTES
           
static MsDosExternalFileAttributes DEFAULT_FILE_ATTRIBUTES
           
 
Constructor Summary
MsDosExternalFileAttributes(MsDosFileAttributes... attributes)
          Create a new attributes object.
MsDosExternalFileAttributes(Set<MsDosFileAttributes> attributes)
          Create a new attributes object.
 
Method Summary
 boolean equals(Object o)
           
 Set<MsDosFileAttributes> getAttributes()
          Get (a copy of) this object's attributes.
 UnsignedInteger getEncodedValue()
          Get the value of the external file attributes encoded for storing in a Zip file.
 ZipVersionMadeBy getVersionMadeBy()
          Get the version of the Zip software used to create these external file attributes.
 int hashCode()
           
 boolean isSet(MsDosFileAttributes attr)
          Is the attribute set?
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_DIRECTORY_ATTRIBUTES

public static final MsDosExternalFileAttributes DEFAULT_DIRECTORY_ATTRIBUTES

DEFAULT_FILE_ATTRIBUTES

public static final MsDosExternalFileAttributes DEFAULT_FILE_ATTRIBUTES
Constructor Detail

MsDosExternalFileAttributes

public MsDosExternalFileAttributes(MsDosFileAttributes... attributes)
Create a new attributes object.

Parameters:
attributes - The attributes.

MsDosExternalFileAttributes

public MsDosExternalFileAttributes(Set<MsDosFileAttributes> attributes)
Create a new attributes object.

Parameters:
attributes - The attributes.
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.

getAttributes

public Set<MsDosFileAttributes> getAttributes()
Get (a copy of) this object's attributes.

Returns:
This object's attributes.

isSet

public boolean isSet(MsDosFileAttributes attr)
Is the attribute set?

Returns:
true if the specified attribute is set.

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.