aQute.bnd.osgi.JarResource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of biz.aQute.bndlib Show documentation
Show all versions of biz.aQute.bndlib Show documentation
bndlib: A Swiss Army Knife for OSGi
package aQute.bnd.osgi;
import java.io.OutputStream;
public class JarResource extends WriteResource {
Jar jar;
long size = -1;
public JarResource(Jar jar) {
this.jar = jar;
}
@Override
public long lastModified() {
return jar.lastModified();
}
@Override
public void write(OutputStream out) throws Exception {
try {
jar.write(out);
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
public Jar getJar() {
return jar;
}
@Override
public String toString() {
return ":" + jar.getName() + ":";
}
}