587
|
1 /**
|
|
2 *
|
|
3 */
|
|
4 package digilib.io;
|
|
5
|
|
6 import java.io.InputStream;
|
|
7
|
|
8 /**
|
|
9 * @author casties
|
590
|
10 *
|
587
|
11 */
|
|
12 public class ImageStream extends ImageInput {
|
|
13
|
590
|
14 protected InputStream stream = null;
|
|
15
|
906
|
16 /** Create ImageStream from InputStream and String.
|
|
17 *
|
|
18 * @param stream
|
|
19 * @param mimeType mime-type
|
|
20 */
|
590
|
21 public ImageStream(InputStream stream, String mimeType) {
|
|
22 this.stream = stream;
|
|
23 this.mimetype = mimeType;
|
|
24 }
|
|
25
|
|
26 /*
|
|
27 * (non-Javadoc)
|
|
28 *
|
|
29 * @see digilib.io.ImageInput#hasInputStream()
|
|
30 */
|
|
31 @Override
|
|
32 public boolean hasInputStream() {
|
|
33 return true;
|
|
34 }
|
|
35
|
|
36 /*
|
|
37 * (non-Javadoc)
|
|
38 *
|
|
39 * @see digilib.io.ImageInput#getInputStream()
|
|
40 */
|
|
41 @Override
|
|
42 public InputStream getInputStream() {
|
|
43 return stream;
|
|
44 }
|
|
45
|
587
|
46 }
|