comparison servlet/src/digilib/io/ImageInput.java @ 574:790cbfb58b52 stream

ripping apart ImageFileSet
author robcast
date Wed, 22 Dec 2010 18:32:06 +0100
parents 34701340922e
children bb8dfc05674f
comparison
equal deleted inserted replaced
573:beeedf90cb81 574:790cbfb58b52
19 * Created on 20.12.2010 19 * Created on 20.12.2010
20 */ 20 */
21 21
22 package digilib.io; 22 package digilib.io;
23 23
24 import java.io.File;
25 import java.io.InputStream;
26
27 import digilib.image.ImageSize; 24 import digilib.image.ImageSize;
28 25
29 public abstract class ImageInput { 26 public abstract class ImageInput {
30 27
31 // mime file type 28 // mime file type
32 protected String mimetype = null; 29 protected String mimetype = null;
33 // image size in pixels 30 // image size in pixels
34 protected ImageSize pixelSize = null; 31 protected ImageSize pixelSize = null;
35
36 /** Returns if this ImageInput is File-based.
37 * @return
38 */
39 public boolean hasFile() {
40 return false;
41 }
42
43 /** Returns the underlying File (if applicable)
44 *
45 * @return
46 */
47 public File getFile() {
48 return null;
49 }
50
51 /** Returns if this ImageInput is Stream-based.
52 * @return
53 */
54 public boolean hasStream() {
55 return false;
56 }
57
58 /** Returns the underlying Stream (if applicable)
59 *
60 * @return
61 */
62 public InputStream getStream() {
63 return null;
64 }
65 32
66 /** 33 /**
67 * @return ImageSize 34 * @return ImageSize
68 */ 35 */
69 public ImageSize getSize() { 36 public ImageSize getSize() {