blob: 0c0adcd9e4fdb3aa51cc5b56d8d3f0938eb6da9e [file] [log] [blame]
Stuart McCullochbb014372012-06-07 21:57:32 +00001package aQute.lib.osgi;
2
3import java.io.*;
4
5public class JarResource extends WriteResource {
6 Jar jar;
7 long size = -1;
8
9 public JarResource(Jar jar) {
10 this.jar = jar;
11 }
12
13 public long lastModified() {
14 return jar.lastModified();
15 }
16
17 public void write(OutputStream out) throws Exception {
18 try {
19 jar.write(out);
20 } catch (Exception e) {
21 e.printStackTrace();
22 throw e;
23 }
24 }
25
26 public Jar getJar() {
27 return jar;
28 }
29
30 public String toString() {
31 return ":" + jar.getName() + ":";
32 }
33
34}