Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.compress.archivers.ar
Class ArArchiveEntry

    java.lang.Object
      org.apache.commons.compress.archivers.ar.ArArchiveEntry

All Implemented Interfaces:
  ArchiveEntry

    public class ArArchiveEntry

extends Object
implements ArchiveEntry

Represents an archive entry in the "ar" format. Each AR archive starts with "!" followed by a LF. After these 8 bytes the archive entries are listed. The format of an entry header is as it follows:

     START BYTE   END BYTE    NAME                    FORMAT      LENGTH
     0            15          File name               ASCII       16
     16           27          Modification timestamp  Decimal     12
     28           33          Owner ID                Decimal     6
     34           39          Group ID                Decimal     6
     40           47          File mode               Octal       8
     48           57          File size (bytes)       Decimal     10
     58           59          File magic              \140\012    2

This specifies that an ar archive entry header contains 60 bytes. Due to the limitation of the file name length to 16 bytes GNU and BSD has their own variants of this format. This formats are currently not supported and file names with a bigger size than 16 bytes are not possible at the moment.

Field Summary
`static String` | `HEADER` The header for each entry
`static String` | `TRAILER` The trailer for each entry

Fields inherited from interface org.apache.commons.compress.archivers.ArchiveEntry
`SIZE_UNKNOWN`

Constructor Summary
`ArArchiveEntry(File inputFile, String entryName)`
`ArArchiveEntry(String name, long length)`
`ArArchiveEntry(String name, long length, int userId, int groupId, int mode, long lastModified)`

Method Summary
`boolean` | `equals(Object obj)`
`int` | `getGroupId()`
`long` | `getLastModified()`
`long` | `getLength()`
`int` | `getMode()`
`String` | `getName()` The name of the entry in the archive.
`long` | `getSize()` The (uncompressed) size of the entry.
`int` | `getUserId()`
`int` | `hashCode()`
`boolean` | `isDirectory()` True if the entry refers to a directory

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### HEADER

    public static final String HEADER

  The header for each entry

  See Also:
    Constant Field Values

### TRAILER

    public static final String TRAILER

  The trailer for each entry

  See Also:
    Constant Field Values

Constructor Detail

### ArArchiveEntry

    public ArArchiveEntry(String name,
                          long length)

### ArArchiveEntry

    public ArArchiveEntry(String name,
                          long length,
                          int userId,
                          int groupId,
                          int mode,
                          long lastModified)

### ArArchiveEntry

    public ArArchiveEntry(File inputFile,
                          String entryName)

Method Detail

### getSize

    public long getSize()

  Description copied from interface: `ArchiveEntry`
  The (uncompressed) size of the entry. May be -1 (SIZE_UNKNOWN) if the size is unknown

  Specified by:
    `getSize` in interface `ArchiveEntry`

### getName

    public String getName()

  Description copied from interface: `ArchiveEntry`
  The name of the entry in the archive. May refer to a file or directory or other item

  Specified by:
    `getName` in interface `ArchiveEntry`

### getUserId

    public int getUserId()

### getGroupId

    public int getGroupId()

### getMode

    public int getMode()

### getLastModified

    public long getLastModified()

### getLength

    public long getLength()

### isDirectory

    public boolean isDirectory()

  Description copied from interface: `ArchiveEntry`
  True if the entry refers to a directory

  Specified by:
    `isDirectory` in interface `ArchiveEntry`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.