public class FileResource extends Resource
| Constructor and Description |
|---|
FileResource(File file) |
| Modifier and Type | Method and Description |
|---|---|
Iterator<String> |
getAllEntries()
There is only one entry.
|
Iterator<String> |
getAllEntriesIncludingFolders()
There is only one entry.
|
List<URL> |
getEntry(String path)
Returns the file URL if the path is the file's one.
|
byte[] |
getEntryBytes(String path)
Returns the content of the file if the path is the file's one.
|
URL |
getEntryRoot(String path)
Returns the file URL if the path is the file's one.
|
File |
getFile() |
String |
getFilename() |
URL |
getFileURL() |
String |
toString() |
createResource, readBytesprotected File file
public FileResource(File file)
public File getFile()
public String getFilename()
public URL getFileURL()
public Iterator<String> getAllEntries() throws Exception
getAllEntries in class ResourceExceptionpublic Iterator<String> getAllEntriesIncludingFolders() throws Exception
getAllEntriesIncludingFolders in class ResourceExceptionpublic List<URL> getEntry(String path) throws Exception
public byte[] getEntryBytes(String path) throws Exception
getEntryBytes in class Resourcepath - the entry pathExceptionpublic URL getEntryRoot(String path) throws Exception
getEntryRoot in class Resourcepath - the entry pathExceptionCopyright © 2016. All rights reserved.