Package org.glassfish.rmic.tools.java
Class PathClassFile
- java.lang.Object
-
- org.glassfish.rmic.tools.java.ClassFile
-
- org.glassfish.rmic.tools.java.PathClassFile
-
final class PathClassFile extends ClassFile
This class is used to represent a file loaded from the class path, and is represented by nio Path. WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.
-
-
Constructor Summary
Constructors Constructor Description PathClassFile(java.nio.file.Path path)
Constructor for instance representing a Path
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
exists()
Returns true if file exists.java.lang.String
getAbsoluteName()
Get absolute name of file entryjava.io.InputStream
getInputStream()
Returns input stream to either regular file or zip file entryjava.lang.String
getName()
Get name of file entry excluding directory namejava.lang.String
getPath()
Get file path.boolean
isDirectory()
Returns true if this is a directory.boolean
isZipped()
Returns true if this is zip file entrylong
lastModified()
Return last modification timelong
length()
Get length of filejava.lang.String
toString()
-
Methods inherited from class org.glassfish.rmic.tools.java.ClassFile
newClassFile, newClassFile, newClassFile
-
-
-
-
Method Detail
-
isZipped
public boolean isZipped()
Description copied from class:ClassFile
Returns true if this is zip file entry
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
Description copied from class:ClassFile
Returns input stream to either regular file or zip file entry- Specified by:
getInputStream
in classClassFile
- Throws:
java.io.IOException
-
exists
public boolean exists()
Description copied from class:ClassFile
Returns true if file exists.
-
isDirectory
public boolean isDirectory()
Description copied from class:ClassFile
Returns true if this is a directory.- Specified by:
isDirectory
in classClassFile
-
lastModified
public long lastModified()
Description copied from class:ClassFile
Return last modification time- Specified by:
lastModified
in classClassFile
-
getPath
public java.lang.String getPath()
Description copied from class:ClassFile
Get file path. The path for a zip file entry will also include the zip file name.
-
getName
public java.lang.String getName()
Description copied from class:ClassFile
Get name of file entry excluding directory name
-
getAbsoluteName
public java.lang.String getAbsoluteName()
Description copied from class:ClassFile
Get absolute name of file entry- Specified by:
getAbsoluteName
in classClassFile
-
length
public long length()
Description copied from class:ClassFile
Get length of file
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-