From 6ff17d04e27759abf2a4294552b023e2be411e80 Mon Sep 17 00:00:00 2001 From: kruland2607 Date: Mon, 7 Jan 2013 22:12:18 -0600 Subject: [PATCH] Extract the Attachment interface from the DecalImage. --- .../net/sf/openrocket/appearance/DecalImage.java | 8 +++----- core/src/net/sf/openrocket/document/Attachment.java | 13 +++++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 core/src/net/sf/openrocket/document/Attachment.java diff --git a/core/src/net/sf/openrocket/appearance/DecalImage.java b/core/src/net/sf/openrocket/appearance/DecalImage.java index 3761242cd..3b56903aa 100644 --- a/core/src/net/sf/openrocket/appearance/DecalImage.java +++ b/core/src/net/sf/openrocket/appearance/DecalImage.java @@ -1,14 +1,12 @@ package net.sf.openrocket.appearance; import java.io.File; -import java.io.FileNotFoundException; import java.io.IOException; -import java.io.InputStream; -public interface DecalImage { +import net.sf.openrocket.document.Attachment; + +public interface DecalImage extends Attachment { - public String getName(); - public InputStream getBytes() throws FileNotFoundException, IOException; public void exportImage( File file, boolean watchForChanges ) throws IOException; } diff --git a/core/src/net/sf/openrocket/document/Attachment.java b/core/src/net/sf/openrocket/document/Attachment.java new file mode 100644 index 000000000..50e96de55 --- /dev/null +++ b/core/src/net/sf/openrocket/document/Attachment.java @@ -0,0 +1,13 @@ +package net.sf.openrocket.document; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; + +public interface Attachment { + + public abstract String getName(); + + public abstract InputStream getBytes() throws FileNotFoundException, IOException; + +} \ No newline at end of file