comparison servlet/src/digilib/image/JAIDocuImage.java @ 566:50f291d808b1 digilibPDF

starting stream support
author robcast
date Mon, 20 Dec 2010 11:57:55 +0100
parents 4c51d71aef13
children beeedf90cb81
comparison
equal deleted inserted replaced
565:8beefd1142b2 566:50f291d808b1
45 45
46 import digilib.io.FileOpException; 46 import digilib.io.FileOpException;
47 import digilib.io.FileOps; 47 import digilib.io.FileOps;
48 import digilib.io.ImageFile; 48 import digilib.io.ImageFile;
49 import digilib.io.ImageFileset; 49 import digilib.io.ImageFileset;
50 import digilib.io.ImageInput;
50 51
51 /** A DocuImage implementation using Java Advanced Imaging Library. */ 52 /** A DocuImage implementation using Java Advanced Imaging Library. */
52 public class JAIDocuImage extends ImageInfoDocuImage { 53 public class JAIDocuImage extends ImageInfoDocuImage {
53 54
54 protected RenderedImage img; 55 protected RenderedImage img;
97 + JAI.getDefaultInstance().getTileCache().getMemoryCapacity()); 98 + JAI.getDefaultInstance().getTileCache().getMemoryCapacity());
98 return formats.iterator(); 99 return formats.iterator();
99 } 100 }
100 101
101 /* Check image size and type and store in ImageFile f */ 102 /* Check image size and type and store in ImageFile f */
102 public ImageFile identify(ImageFile imageFile) throws IOException { 103 public ImageInput identify(ImageFile imageFile) throws IOException {
103 // try parent method first 104 // try parent method first
104 ImageFile imf = super.identify(imageFile); 105 ImageInput imf = super.identify(imageFile);
105 if (imf != null) { 106 if (imf != null) {
106 return imf; 107 return imf;
107 } 108 }
108 // fileset to store the information 109 // fileset to store the information
109 ImageFileset imgfs = imageFile.getParent(); 110 ImageFileset imgfs = imageFile.getParent();