Package jadex.extension.rs.publish
Class UniversalClasspathResource
- java.lang.Object
-
- org.eclipse.jetty.util.resource.Resource
-
- jadex.extension.rs.publish.UniversalClasspathResource
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,org.eclipse.jetty.util.resource.ResourceFactory
public class UniversalClasspathResource extends org.eclipse.jetty.util.resource.Resource
Single resource that can handle all items in classpath.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
path
The path of the resource (relative to classpath, e.g.
-
Constructor Summary
Constructors Constructor Description UniversalClasspathResource(java.lang.String rootpath)
Create a resource for the given path in classpath.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.jetty.util.resource.Resource
addPath(java.lang.String path)
void
close()
boolean
delete()
boolean
exists()
java.io.File
getFile()
java.io.InputStream
getInputStream()
java.lang.String
getName()
java.nio.channels.ReadableByteChannel
getReadableByteChannel()
java.net.URL
getURL()
boolean
isContainedIn(org.eclipse.jetty.util.resource.Resource r)
boolean
isDirectory()
long
lastModified()
long
length()
java.lang.String[]
list()
boolean
renameTo(org.eclipse.jetty.util.resource.Resource dest)
-
Methods inherited from class org.eclipse.jetty.util.resource.Resource
copyTo, encode, finalize, getAlias, getAllResources, getAssociate, getDefaultUseCaches, getListHTML, getListHTML, getResource, getURI, getWeakETag, getWeakETag, isAlias, isContainedIn, newClassPathResource, newClassPathResource, newResource, newResource, newResource, newResource, newResource, newResource, newSystemResource, release, setAssociate, setDefaultUseCaches, toURL, writeTo
-
-
-
-
Method Detail
-
addPath
public org.eclipse.jetty.util.resource.Resource addPath(java.lang.String path) throws java.io.IOException, java.net.MalformedURLException
- Specified by:
addPath
in classorg.eclipse.jetty.util.resource.Resource
- Throws:
java.io.IOException
java.net.MalformedURLException
-
getURL
public java.net.URL getURL()
- Specified by:
getURL
in classorg.eclipse.jetty.util.resource.Resource
-
isContainedIn
public boolean isContainedIn(org.eclipse.jetty.util.resource.Resource r) throws java.net.MalformedURLException
- Specified by:
isContainedIn
in classorg.eclipse.jetty.util.resource.Resource
- Throws:
java.net.MalformedURLException
-
isDirectory
public boolean isDirectory()
- Specified by:
isDirectory
in classorg.eclipse.jetty.util.resource.Resource
-
lastModified
public long lastModified()
- Specified by:
lastModified
in classorg.eclipse.jetty.util.resource.Resource
-
length
public long length()
- Specified by:
length
in classorg.eclipse.jetty.util.resource.Resource
-
list
public java.lang.String[] list()
- Specified by:
list
in classorg.eclipse.jetty.util.resource.Resource
-
renameTo
public boolean renameTo(org.eclipse.jetty.util.resource.Resource dest) throws java.lang.SecurityException
- Specified by:
renameTo
in classorg.eclipse.jetty.util.resource.Resource
- Throws:
java.lang.SecurityException
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in classorg.eclipse.jetty.util.resource.Resource
-
delete
public boolean delete() throws java.lang.SecurityException
- Specified by:
delete
in classorg.eclipse.jetty.util.resource.Resource
- Throws:
java.lang.SecurityException
-
exists
public boolean exists()
- Specified by:
exists
in classorg.eclipse.jetty.util.resource.Resource
-
getFile
public java.io.File getFile() throws java.io.IOException
- Specified by:
getFile
in classorg.eclipse.jetty.util.resource.Resource
- Throws:
java.io.IOException
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
- Specified by:
getInputStream
in classorg.eclipse.jetty.util.resource.Resource
- Throws:
java.io.IOException
-
getName
public java.lang.String getName()
- Specified by:
getName
in classorg.eclipse.jetty.util.resource.Resource
-
getReadableByteChannel
public java.nio.channels.ReadableByteChannel getReadableByteChannel() throws java.io.IOException
- Specified by:
getReadableByteChannel
in classorg.eclipse.jetty.util.resource.Resource
- Throws:
java.io.IOException
-
-