]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/build/ResourceDistribution.java
Simplify minimal configs for execution
[gpl/argeo-slc.git] / runtime / org.argeo.slc.core / src / main / java / org / argeo / slc / core / build / ResourceDistribution.java
index c24d6ec6c0017b3c5acc8e9ea7622f5e23b0ea3d..633be7a7fd97d9f2e46cddc12f54b7b4a42ff75e 100644 (file)
@@ -1,9 +1,14 @@
 package org.argeo.slc.core.build;
 
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.argeo.slc.SlcException;
+import org.argeo.slc.StreamReadable;
 import org.argeo.slc.build.Distribution;
 import org.springframework.core.io.Resource;
 
-public class ResourceDistribution implements Distribution {
+public class ResourceDistribution implements Distribution, StreamReadable {
        private Resource location;
 
        public ResourceDistribution() {
@@ -25,4 +30,12 @@ public class ResourceDistribution implements Distribution {
                this.location = location;
        }
 
+       public InputStream getInputStream() {
+               try {
+                       return location.getInputStream();
+               } catch (IOException e) {
+                       throw new SlcException("Cannot get input stream", e);
+               }
+       }
+
 }