public class ClassPathResource extends Object implements aQute.bnd.osgi.Resource
| Modifier and Type | Field and Description |
|---|---|
private String |
extra |
private long |
modified |
private com.google.common.reflect.ClassPath.ResourceInfo |
resource |
| Constructor and Description |
|---|
ClassPathResource(com.google.common.reflect.ClassPath.ResourceInfo resource)
Creates the Classpath resource from the given resource.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
build(aQute.bnd.osgi.Jar jar,
com.google.common.reflect.ClassPath classpath,
Pattern doNotCopy)
Adds all the resources found in the given classpath to the given jar.
|
String |
getExtra() |
long |
lastModified() |
InputStream |
openInputStream()
Gets an stream on the wrapped resource.
|
void |
setExtra(String extra)
Sets the extra parameter of information about this resource.
|
long |
size() |
String |
toString() |
void |
write(OutputStream out)
Writes the content of the current resource to the given output stream.
|
private final com.google.common.reflect.ClassPath.ResourceInfo resource
private String extra
private long modified
public ClassPathResource(com.google.common.reflect.ClassPath.ResourceInfo resource)
resource - the wrapped resourcepublic InputStream openInputStream() throws IOException
openInputStream in interface aQute.bnd.osgi.ResourceIOException - if the stream cannot be openedpublic static void build(aQute.bnd.osgi.Jar jar,
com.google.common.reflect.ClassPath classpath,
Pattern doNotCopy)
jar - the jar in which the resources are addedclasspath - the classpathdoNotCopy - the do not copy patternpublic String toString()
public void write(OutputStream out) throws Exception
write in interface aQute.bnd.osgi.Resourceout - the output stream, not closed by this methodException - if something wrong happened while copying the resourcepublic long lastModified()
lastModified in interface aQute.bnd.osgi.Resourcepublic String getExtra()
getExtra in interface aQute.bnd.osgi.Resourcepublic long size()
throws Exception
size in interface aQute.bnd.osgi.ResourceException - if something bad happens.public void setExtra(String extra)
setExtra in interface aQute.bnd.osgi.Resourceextra - the extraCopyright © 2013–2015 Wisdom Framework. All rights reserved.