org.codehaus.plexus.archiver
Class ArchiveEntry
java.lang.Object
org.codehaus.plexus.archiver.ArchiveEntry
public class ArchiveEntry
- extends java.lang.Object
- Version:
- $Revision: 1502 $ $Date: 2010-01-26 15:18:10 -0500 (Tue, 26 Jan 2010) $
Method Summary |
static ArchiveEntry |
createDirectoryEntry(java.lang.String target,
java.io.File file,
int permissions)
|
static ArchiveEntry |
createDirectoryEntry(java.lang.String target,
org.codehaus.plexus.components.io.resources.PlexusIoResource resource,
int permissions)
|
static ArchiveEntry |
createEntry(java.lang.String target,
java.io.File file,
int filePerm,
int dirPerm)
|
static ArchiveEntry |
createFileEntry(java.lang.String target,
java.io.File file,
int permissions)
|
static ArchiveEntry |
createFileEntry(java.lang.String target,
org.codehaus.plexus.components.io.resources.PlexusIoResource resource,
int permissions)
|
java.io.File |
getFile()
Deprecated. As of 1.0-alpha-10, file entries are no longer backed
by files, but by instances of PlexusIoResource .
Consequently, you should use getInputStream() - |
java.io.InputStream |
getInputStream()
|
int |
getMode()
|
java.lang.String |
getName()
|
org.codehaus.plexus.components.io.resources.PlexusIoResource |
getResource()
|
org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes |
getResourceAttributes()
|
int |
getType()
TODO: support for SYMLINK? |
void |
setResourceAttributes(org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes attributes)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ROLE
public static final java.lang.String ROLE
FILE
public static final int FILE
- See Also:
- Constant Field Values
DIRECTORY
public static final int DIRECTORY
- See Also:
- Constant Field Values
getName
public java.lang.String getName()
- Returns:
- the filename of this entry in the archive.
getFile
public java.io.File getFile()
- Deprecated. As of 1.0-alpha-10, file entries are no longer backed
by files, but by instances of
PlexusIoResource
.
Consequently, you should use getInputStream()
-
- Returns:
- The original file that will be stored in the archive.
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
- Returns:
- The resource contents.
- Throws:
java.io.IOException
getType
public int getType()
- TODO: support for SYMLINK?
- Returns:
- FILE or DIRECTORY
getMode
public int getMode()
- Returns:
- octal user/group/other unix like permissions.
createFileEntry
public static ArchiveEntry createFileEntry(java.lang.String target,
org.codehaus.plexus.components.io.resources.PlexusIoResource resource,
int permissions)
throws ArchiverException
- Throws:
ArchiverException
createFileEntry
public static ArchiveEntry createFileEntry(java.lang.String target,
java.io.File file,
int permissions)
throws ArchiverException
- Throws:
ArchiverException
createDirectoryEntry
public static ArchiveEntry createDirectoryEntry(java.lang.String target,
org.codehaus.plexus.components.io.resources.PlexusIoResource resource,
int permissions)
throws ArchiverException
- Throws:
ArchiverException
createDirectoryEntry
public static ArchiveEntry createDirectoryEntry(java.lang.String target,
java.io.File file,
int permissions)
throws ArchiverException
- Throws:
ArchiverException
createEntry
public static ArchiveEntry createEntry(java.lang.String target,
java.io.File file,
int filePerm,
int dirPerm)
throws ArchiverException
- Throws:
ArchiverException
getResourceAttributes
public org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes getResourceAttributes()
setResourceAttributes
public void setResourceAttributes(org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes attributes)
getResource
public org.codehaus.plexus.components.io.resources.PlexusIoResource getResource()
Copyright © 2001-2010 Codehaus. All Rights Reserved.