org.codehaus.plexus.archiver
Class ArchiveEntry
java.lang.Object
org.codehaus.plexus.archiver.ArchiveEntry
public class ArchiveEntry
- extends Object
- Version:
- $Revision: 1502 $ $Date$
Method Summary |
static ArchiveEntry |
createDirectoryEntry(String target,
File file,
int permissions)
|
static ArchiveEntry |
createDirectoryEntry(String target,
org.codehaus.plexus.components.io.resources.PlexusIoResource resource,
int permissions)
|
static ArchiveEntry |
createEntry(String target,
File file,
int filePerm,
int dirPerm)
|
static ArchiveEntry |
createFileEntry(String target,
File file,
int permissions)
|
static ArchiveEntry |
createFileEntry(String target,
org.codehaus.plexus.components.io.resources.PlexusIoResource resource,
int permissions)
|
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() - |
InputStream |
getInputStream()
|
int |
getMode()
|
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 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 String getName()
- Returns:
- the filename of this entry in the archive.
getFile
public 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 InputStream getInputStream()
throws IOException
- Returns:
- The resource contents.
- Throws:
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(String target,
org.codehaus.plexus.components.io.resources.PlexusIoResource resource,
int permissions)
throws ArchiverException
- Throws:
ArchiverException
createFileEntry
public static ArchiveEntry createFileEntry(String target,
File file,
int permissions)
throws ArchiverException
- Throws:
ArchiverException
createDirectoryEntry
public static ArchiveEntry createDirectoryEntry(String target,
org.codehaus.plexus.components.io.resources.PlexusIoResource resource,
int permissions)
throws ArchiverException
- Throws:
ArchiverException
createDirectoryEntry
public static ArchiveEntry createDirectoryEntry(String target,
File file,
int permissions)
throws ArchiverException
- Throws:
ArchiverException
createEntry
public static ArchiveEntry createEntry(String target,
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 © 2008-2012 Sonatype, Inc.. All Rights Reserved.