diff servlet/src/digilib/io/ImageInput.java @ 588:aee436f0549d stream

more work on stream input
author robcast
date Thu, 06 Jan 2011 14:37:50 +0100
parents 720d061a1b30
children 2b58d2783ef0
line wrap: on
line diff
--- a/servlet/src/digilib/io/ImageInput.java	Thu Jan 06 11:57:32 2011 +0100
+++ b/servlet/src/digilib/io/ImageInput.java	Thu Jan 06 14:37:50 2011 +0100
@@ -22,6 +22,7 @@
 package digilib.io;
 
 import java.io.File;
+import java.io.InputStream;
 
 import javax.imageio.stream.ImageInputStream;
 
@@ -33,6 +34,7 @@
 	protected String mimetype = null;
 	// image size in pixels
 	protected ImageSize pixelSize = null;
+    protected ImageSet parent = null;
 
 	/**
 	 * @return ImageSize
@@ -81,7 +83,22 @@
 		return (pixelSize != null) ? pixelSize.getAspect() : 0f;
 	}
 	
-	/** Returns if the input can be returned as ImageInputStream.
+    /**
+     * @return ImageSet
+     */
+    public ImageSet getParent() {
+        return parent;
+    }
+
+    /**
+     * Sets the parent.
+     * @param parent The parent to set
+     */
+    public void setParent(ImageSet parent) {
+        this.parent = parent;
+    }
+
+    /** Returns if the input can be returned as ImageInputStream.
 	 * 
 	 * @return
 	 */
@@ -97,6 +114,22 @@
 		return null;
 	}
 	
+    /** Returns if the input can be returned as InputStream.
+     * 
+     * @return
+     */
+    public boolean hasInputStream() {
+        return false;
+    }
+    
+    /** Returns the input as InputStream (if available)
+     * 
+     * @return
+     */
+    public InputStream getInputStream() {
+        return null;
+    }
+    
 	/** Returns if the input can be returned as File.
 	 * 
 	 * @return
@@ -112,6 +145,7 @@
 	public File getFile() {
 		return null;
 	}
+
 	
 	
 }
\ No newline at end of file