blob: c51aba377c87fa437d436611c1b2121e0e45c811 [file] [log] [blame]
Stuart McCullochf3173222012-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);
Stuart McCulloch4482c702012-06-15 13:27:53 +000020 }
21 catch (Exception e) {
Stuart McCullochf3173222012-06-07 21:57:32 +000022 e.printStackTrace();
23 throw e;
24 }
25 }
26
27 public Jar getJar() {
28 return jar;
29 }
30
31 public String toString() {
32 return ":" + jar.getName() + ":";
33 }
34
35}