Mercurial > hg > digilib-old
comparison servlet/src/digilib/image/ImageInfoDocuImage.java @ 566:50f291d808b1 digilibPDF
starting stream support
| author | robcast |
|---|---|
| date | Mon, 20 Dec 2010 11:57:55 +0100 |
| parents | 4c51d71aef13 |
| children | aee436f0549d |
comparison
equal
deleted
inserted
replaced
| 565:8beefd1142b2 | 566:50f291d808b1 |
|---|---|
| 8 import java.io.RandomAccessFile; | 8 import java.io.RandomAccessFile; |
| 9 | 9 |
| 10 import org.marcoschmidt.image.ImageInfo; | 10 import org.marcoschmidt.image.ImageInfo; |
| 11 | 11 |
| 12 import digilib.io.ImageFile; | 12 import digilib.io.ImageFile; |
| 13 import digilib.io.ImageInput; | |
| 13 | 14 |
| 14 /** Simple abstract implementation of the <code>DocuImage</code> interface. | 15 /** Simple abstract implementation of the <code>DocuImage</code> interface. |
| 15 * Implements only the identify method using the ImageInfo class. | 16 * Implements only the identify method using the ImageInfo class. |
| 16 * @author casties | 17 * @author casties |
| 17 * | 18 * |
| 18 */ | 19 */ |
| 19 public abstract class ImageInfoDocuImage extends DocuImageImpl { | 20 public abstract class ImageInfoDocuImage extends DocuImageImpl { |
| 20 | 21 |
| 21 /** Check image size and type and store in ImageFile f */ | 22 /** Check image size and type and store in ImageFile f */ |
| 22 public ImageFile identify(ImageFile imgf) throws IOException { | 23 public ImageInput identify(ImageFile imgf) throws IOException { |
| 23 // fileset to store the information | 24 // fileset to store the information |
| 24 File f = imgf.getFile(); | 25 File f = imgf.getFile(); |
| 25 if (f == null) { | 26 if (f == null) { |
| 26 throw new IOException("File not found!"); | 27 throw new IOException("File not found!"); |
| 27 } | 28 } |
