public abstract class Resource extends Object
| Constructor and Description |
|---|
Resource() |
| Modifier and Type | Method and Description |
|---|---|
static Resource |
createResource(File file)
Create the correct Resource type from the file.
|
abstract Iterator<String> |
getAllEntries()
Returns all the path entries
|
abstract Iterator<String> |
getAllEntriesIncludingFolders()
Returns all the path entries including folders
|
abstract List<URL> |
getEntry(String path)
Returns all the URLs found for an entry path (for the moment there is only one URL by type)
|
abstract byte[] |
getEntryBytes(String path)
Returns the content for an entry path
|
abstract URL |
getEntryRoot(String path)
Returns the URL found for an entry path
|
protected byte[] |
readBytes(InputStream in) |
public static Resource createResource(File file)
file - the path of the artifactpublic abstract List<URL> getEntry(String path) throws Exception
path - the entry pathExceptionpublic abstract URL getEntryRoot(String path) throws Exception
path - the entry pathExceptionpublic abstract byte[] getEntryBytes(String path) throws Exception
path - the entry pathExceptionpublic abstract Iterator<String> getAllEntries() throws Exception
Exceptionpublic abstract Iterator<String> getAllEntriesIncludingFolders() throws Exception
Exceptionprotected byte[] readBytes(InputStream in) throws IOException
IOExceptionCopyright © 2016. All rights reserved.