Top Description Inners Fields Constructors Methods
org.apache.commons.compress.archivers.arj

public Class ArjArchiveEntry

extends Object
implements ArchiveEntry
Class Inheritance
All Implemented Interfaces
org.apache.commons.compress.archivers.ArchiveEntry
Imports
java.io.File, java.util.Date, org.apache.commons.compress.archivers.ArchiveEntry, org.apache.commons.compress.archivers.zip.ZipUtil

An entry in an ARJ archive.
Since
1.6

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
ArjArchiveEntry.HostOs

The known values for HostOs.

Field Summary

Modifier and TypeField and Description
private final LocalFileHeader

Constructor Summary

AccessConstructor and Description
public
pack-priv
ArjArchiveEntry(final LocalFileHeader localFileHeader)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(final Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public int

Returns:

the host OS code
getHostOs
()

The operating system the archive has been created on.

public Date

Returns:

the last modified date
getLastModifiedDate
()

Implements org.apache.commons.compress.archivers.ArchiveEntry.getLastModifiedDate.

The last modified date of the entry.
pack-priv int
public int

Returns:

the file mode
getMode
()

File mode of this entry.

public String

Returns:

This entry's name.
getName
()

Implements org.apache.commons.compress.archivers.ArchiveEntry.getName.

Gets this entry's name.
public long

Returns:

This entry's file size.
getSize
()

Implements org.apache.commons.compress.archivers.ArchiveEntry.getSize.

Gets this entry's file size.
public int

Returns:

the Unix mode
getUnixMode
()

File mode of this entry as Unix stat value.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
public boolean

Returns:

True if the entry refers to a directory
isDirectory
()

Implements org.apache.commons.compress.archivers.ArchiveEntry.isDirectory.

True if the entry refers to a directory.
public boolean

Returns:

whether the operating system the archive has been created on is considered a UNIX OS by arj
isHostOsUnix
()

Is the operating system the archive has been created on one that is considered a UNIX OS by arj?

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

localFileHeaderback to summary
private final LocalFileHeader localFileHeader

Constructor Detail

ArjArchiveEntryback to summary
public ArjArchiveEntry()
ArjArchiveEntryback to summary
pack-priv ArjArchiveEntry(final LocalFileHeader localFileHeader)

Method Detail

equalsback to summary
public boolean equals(final Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getHostOsback to summary
public int getHostOs()

The operating system the archive has been created on.

Returns:int

the host OS code

See Also
HostOs
getLastModifiedDateback to summary
public Date getLastModifiedDate()

Implements org.apache.commons.compress.archivers.ArchiveEntry.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 Unix stores 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.

Returns:Date

the last modified date

Annotations
@Override
getMethodback to summary
pack-priv int getMethod()
getModeback to summary
public int getMode()

File mode of this entry.

The format depends on the host os that created the entry.

Returns:int

the file mode

getNameback to summary
public String getName()

Implements org.apache.commons.compress.archivers.ArchiveEntry.getName.

Gets this entry's name.

This method returns the raw name as it is stored inside of the archive.

Returns:String

This entry's name.

Annotations
@Override
getSizeback to summary
public long getSize()

Implements org.apache.commons.compress.archivers.ArchiveEntry.getSize.

Gets this entry's file size.

Returns:long

This entry's file size.

Annotations
@Override
getUnixModeback to summary
public int getUnixMode()

File mode of this entry as Unix stat value.

Will only be non-zero of the host os was UNIX.

Returns:int

the Unix mode

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override
isDirectoryback to summary
public boolean isDirectory()

Implements org.apache.commons.compress.archivers.ArchiveEntry.isDirectory.

True if the entry refers to a directory.

Returns:boolean

True if the entry refers to a directory

Annotations
@Override
isHostOsUnixback to summary
public boolean isHostOsUnix()

Is the operating system the archive has been created on one that is considered a UNIX OS by arj?

Returns:boolean

whether the operating system the archive has been created on is considered a UNIX OS by arj

org.apache.commons.compress.archivers.arj back to summary

public Class ArjArchiveEntry.HostOs

extends Object
Class Inheritance
  • java.lang.Object
  • org.apache.commons.compress.archivers.arj.ArjArchiveEntry.HostOs

The known values for HostOs.

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
DOS

0

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

AMIGAback to summary
public static final int AMIGA

3

APPLE_GSback to summary
public static final int APPLE_GS

6

ATARI_STback to summary
public static final int ATARI_ST

7

DOSback to summary
public static final int DOS

0

MAC_OSback to summary
public static final int MAC_OS

4

NEXTback to summary
public static final int NEXT

8

OS_2back to summary
public static final int OS_2

5

PRIMOSback to summary
public static final int PRIMOS

1

UNIXback to summary
public static final int UNIX

2

VAX_VMSback to summary
public static final int VAX_VMS

9

WIN32back to summary
public static final int WIN32

11

WIN95back to summary
public static final int WIN95

10

Constructor Detail

HostOsback to summary
public HostOs()