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
|
|
16 public ImageStream(InputStream stream, String mimeType) {
|
|
17 this.stream = stream;
|
|
18 this.mimetype = mimeType;
|
|
19 }
|
|
20
|
|
21 /*
|
|
22 * (non-Javadoc)
|
|
23 *
|
|
24 * @see digilib.io.ImageInput#hasInputStream()
|
|
25 */
|
|
26 @Override
|
|
27 public boolean hasInputStream() {
|
|
28 return true;
|
|
29 }
|
|
30
|
|
31 /*
|
|
32 * (non-Javadoc)
|
|
33 *
|
|
34 * @see digilib.io.ImageInput#getInputStream()
|
|
35 */
|
|
36 @Override
|
|
37 public InputStream getInputStream() {
|
|
38 return stream;
|
|
39 }
|
|
40
|
587
|
41 }
|