Update to latest refactored bndlib
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1362033 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/aQute/bnd/osgi/CombinedResource.java b/bundleplugin/src/main/java/aQute/bnd/osgi/CombinedResource.java
new file mode 100644
index 0000000..d38f416
--- /dev/null
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/CombinedResource.java
@@ -0,0 +1,33 @@
+package aQute.bnd.osgi;
+
+import java.io.*;
+import java.util.*;
+
+public class CombinedResource extends WriteResource {
+ final List<Resource> resources = new ArrayList<Resource>();
+ long lastModified = 0;
+
+ @Override
+ public void write(final OutputStream out) throws IOException, Exception {
+ OutputStream unclosable = new FilterOutputStream(out) {
+ public void close() {
+ // Ignore
+ }
+ };
+ for (Resource r : resources) {
+ r.write(unclosable);
+ unclosable.flush();
+ }
+ }
+
+ @Override
+ public long lastModified() {
+ return lastModified;
+ }
+
+ public void addResource(Resource r) {
+ lastModified = Math.max(lastModified, r.lastModified());
+ resources.add(r);
+ }
+
+}