|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.rad.io.DirectoryHandle
public class DirectoryHandle
The DirectorHandle
is an IFileHandle
representation for directories.
It does not allow file access. It is only an informative class.
Constructor Summary | |
---|---|
DirectoryHandle(java.io.File pDirectory)
Creates a new instance of DirectoryHandle and checks if the
directory exists. |
|
DirectoryHandle(java.lang.String pDirectory)
Creates a new instance of DirectoryHandle without checks. |
Method Summary | |
---|---|
java.lang.String |
getFileName()
Gets the file name of this file handle. |
java.io.InputStream |
getInputStream()
Gets the InputStream of this file handle. |
long |
getLength()
Gets the length of the InputStream in bytes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DirectoryHandle(java.lang.String pDirectory)
DirectoryHandle
without checks.
pDirectory
- the absolute directory path. If the path does not exist,
it doesn't matterpublic DirectoryHandle(java.io.File pDirectory)
DirectoryHandle
and checks if the
directory exists.
pDirectory
- the directory
java.lang.IllegalArgumentException
- if directory does not existMethod Detail |
---|
public java.lang.String getFileName()
getFileName
in interface IFileHandle
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in interface IFileHandle
java.io.IOException
- if an exception occurs.public long getLength() throws java.io.IOException
getLength
in interface IFileHandle
java.io.IOException
- if an exception occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |