Mercurial > hg > digilib-old
comparison 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 |
comparison
equal
deleted
inserted
replaced
587:720d061a1b30 | 588:aee436f0549d |
---|---|
20 */ | 20 */ |
21 | 21 |
22 package digilib.io; | 22 package digilib.io; |
23 | 23 |
24 import java.io.File; | 24 import java.io.File; |
25 import java.io.InputStream; | |
25 | 26 |
26 import javax.imageio.stream.ImageInputStream; | 27 import javax.imageio.stream.ImageInputStream; |
27 | 28 |
28 import digilib.image.ImageSize; | 29 import digilib.image.ImageSize; |
29 | 30 |
31 | 32 |
32 // mime file type | 33 // mime file type |
33 protected String mimetype = null; | 34 protected String mimetype = null; |
34 // image size in pixels | 35 // image size in pixels |
35 protected ImageSize pixelSize = null; | 36 protected ImageSize pixelSize = null; |
37 protected ImageSet parent = null; | |
36 | 38 |
37 /** | 39 /** |
38 * @return ImageSize | 40 * @return ImageSize |
39 */ | 41 */ |
40 public ImageSize getSize() { | 42 public ImageSize getSize() { |
79 */ | 81 */ |
80 public float getAspect() { | 82 public float getAspect() { |
81 return (pixelSize != null) ? pixelSize.getAspect() : 0f; | 83 return (pixelSize != null) ? pixelSize.getAspect() : 0f; |
82 } | 84 } |
83 | 85 |
84 /** Returns if the input can be returned as ImageInputStream. | 86 /** |
87 * @return ImageSet | |
88 */ | |
89 public ImageSet getParent() { | |
90 return parent; | |
91 } | |
92 | |
93 /** | |
94 * Sets the parent. | |
95 * @param parent The parent to set | |
96 */ | |
97 public void setParent(ImageSet parent) { | |
98 this.parent = parent; | |
99 } | |
100 | |
101 /** Returns if the input can be returned as ImageInputStream. | |
85 * | 102 * |
86 * @return | 103 * @return |
87 */ | 104 */ |
88 public boolean hasImageInputStream() { | 105 public boolean hasImageInputStream() { |
89 return false; | 106 return false; |
95 */ | 112 */ |
96 public ImageInputStream getImageInputStream() { | 113 public ImageInputStream getImageInputStream() { |
97 return null; | 114 return null; |
98 } | 115 } |
99 | 116 |
117 /** Returns if the input can be returned as InputStream. | |
118 * | |
119 * @return | |
120 */ | |
121 public boolean hasInputStream() { | |
122 return false; | |
123 } | |
124 | |
125 /** Returns the input as InputStream (if available) | |
126 * | |
127 * @return | |
128 */ | |
129 public InputStream getInputStream() { | |
130 return null; | |
131 } | |
132 | |
100 /** Returns if the input can be returned as File. | 133 /** Returns if the input can be returned as File. |
101 * | 134 * |
102 * @return | 135 * @return |
103 */ | 136 */ |
104 public boolean hasFile() { | 137 public boolean hasFile() { |
110 * @return | 143 * @return |
111 */ | 144 */ |
112 public File getFile() { | 145 public File getFile() { |
113 return null; | 146 return null; |
114 } | 147 } |
148 | |
115 | 149 |
116 | 150 |
117 } | 151 } |