public abstract class ClassFile
extends java.lang.Object
| Constructor and Description |
|---|
ClassFile() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
exists()
Returns true if file exists.
|
abstract java.lang.String |
getAbsoluteName()
Get absolute name of file entry
|
abstract java.io.InputStream |
getInputStream()
Returns input stream to either regular file or zip file entry
|
abstract java.lang.String |
getName()
Get name of file entry excluding directory name
|
abstract java.lang.String |
getPath()
Get file path.
|
abstract boolean |
isDirectory()
Returns true if this is a directory.
|
abstract boolean |
isZipped()
Returns true if this is zip file entry
|
abstract long |
lastModified()
Return last modification time
|
abstract long |
length()
Get length of file
|
static ClassFile |
newClassFile(java.io.File file)
Factory method to create a ClassFile backed by a File.
|
static ClassFile |
newClassFile(java.nio.file.Path path)
Factory method to create a ClassFile backed by a nio Path.
|
static ClassFile |
newClassFile(java.util.zip.ZipFile zf,
java.util.zip.ZipEntry ze)
Factory method to create a ClassFile backed by a ZipEntry.
|
public static ClassFile newClassFile(java.io.File file)
file - a File objectpublic static ClassFile newClassFile(java.util.zip.ZipFile zf, java.util.zip.ZipEntry ze)
zf - a ZipFileze - a ZipEntry within the zip filepublic static ClassFile newClassFile(java.nio.file.Path path)
path - nio Path objectpublic abstract boolean isZipped()
public abstract java.io.InputStream getInputStream()
throws java.io.IOException
java.io.IOExceptionpublic abstract boolean exists()
public abstract boolean isDirectory()
public abstract long lastModified()
public abstract java.lang.String getPath()
public abstract java.lang.String getName()
public abstract java.lang.String getAbsoluteName()
public abstract long length()
Copyright © 2017. All Rights Reserved.