Class ArjArchiveEntry
- java.lang.Object
-
- org.apache.commons.compress.archivers.arj.ArjArchiveEntry
-
- All Implemented Interfaces:
ArchiveEntry
public class ArjArchiveEntry extends java.lang.Object implements ArchiveEntry
An entry in an ARJ archive.- Since:
- 1.6
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classArjArchiveEntry.HostOsThe known values for HostOs.
-
Field Summary
-
Fields inherited from interface org.apache.commons.compress.archivers.ArchiveEntry
SIZE_UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description ArjArchiveEntry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)intgetHostOs()The operating system the archive has been created on.java.util.DategetLastModifiedDate()The last modified date of the entry.intgetMode()File mode of this entry.java.lang.StringgetName()Get this entry's name.longgetSize()Get this entry's file size.intgetUnixMode()File mode of this entry as Unix stat value.inthashCode()booleanisDirectory()True if the entry refers to a directory.booleanisHostOsUnix()Is the operating system the archive has been created on one that is considered a UNIX OS by arj?
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Get this entry's name.This method returns the raw name as it is stored inside of the archive.
- Specified by:
getNamein interfaceArchiveEntry- Returns:
- This entry's name.
-
getSize
public long getSize()
Get this entry's file size.- Specified by:
getSizein interfaceArchiveEntry- Returns:
- This entry's file size.
-
isDirectory
public boolean isDirectory()
True if the entry refers to a directory.- Specified by:
isDirectoryin interfaceArchiveEntry- Returns:
- True if the entry refers to a directory
-
getLastModifiedDate
public java.util.Date getLastModifiedDate()
The last modified date of the entry.Note the interpretation of time is different depending on the HostOS that has created the archive. While an OS that is
considered to be Unixstores time in a time zone independent manner, other platforms only use the local time. I.e. if an archive has been created at midnight UTC on a machine in time zone UTC this method will return midnight regardless of time zone if the archive has been created on a non-Unix system and a time taking the current time zone into account if the archive has been created on Unix.- Specified by:
getLastModifiedDatein interfaceArchiveEntry- Returns:
- the last modified date
-
getMode
public int getMode()
File mode of this entry.The format depends on the host os that created the entry.
- Returns:
- the file mode
-
getUnixMode
public int getUnixMode()
File mode of this entry as Unix stat value.Will only be non-zero of the host os was UNIX.
- Returns:
- the Unix mode
-
getHostOs
public int getHostOs()
The operating system the archive has been created on.- Returns:
- the host OS code
- See Also:
ArjArchiveEntry.HostOs
-
isHostOsUnix
public boolean isHostOsUnix()
Is the operating system the archive has been created on one that is considered a UNIX OS by arj?- Returns:
- whether the operating system the archive has been created on is considered a UNIX OS by arj
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-