Mercurial > hg > digilib-old
changeset 156:688ad0b8b0fa
Servlet version 1.16a2
- fixed problem with tiff images in ImageInfo
author | robcast |
---|---|
date | Wed, 03 Sep 2003 21:06:25 +0200 |
parents | d060019c11f9 |
children | 4879b944bb03 |
files | client/digitallibrary/WEB-INF/lib/DigilibServlet.jar servlet/src/digilib/image/ImageLoaderImageInfoDocuInfo.java servlet/src/digilib/io/DocuDirectory.java servlet/src/digilib/servlet/DigilibConfiguration.java servlet/src/digilib/servlet/Scaler.java |
diffstat | 5 files changed, 16 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/servlet/src/digilib/image/ImageLoaderImageInfoDocuInfo.java Wed Sep 03 00:58:37 2003 +0200 +++ b/servlet/src/digilib/image/ImageLoaderImageInfoDocuInfo.java Wed Sep 03 21:06:25 2003 +0200 @@ -31,6 +31,7 @@ import javax.imageio.stream.ImageInputStream; import digilib.io.DocuFile; +import digilib.io.FileOpException; import digilib.io.FileOps; /** @@ -60,6 +61,9 @@ Iterator readers = ImageIO.getImageReaders(istream); //String ext = f.getName().substring(f.getName().lastIndexOf('.')+1); //Iterator readers = ImageIO.getImageReadersBySuffix(ext); + if (! readers.hasNext()) { + throw new FileOpException("ERROR: unknown image file format!"); + } ImageReader reader = (ImageReader) readers.next(); /* are there more readers? */ System.out.println("this reader: " + reader.getClass());
--- a/servlet/src/digilib/io/DocuDirectory.java Wed Sep 03 00:58:37 2003 +0200 +++ b/servlet/src/digilib/io/DocuDirectory.java Wed Sep 03 21:06:25 2003 +0200 @@ -51,15 +51,15 @@ private long objectATime = 0; // time the file system directory was last modified private long dirMTime = 0; - /* * constructors */ - /** Constructor with directory path and set of base directories. + /** Constructor with directory path and a parent DocuDirCache. * - * Reads the directory at the given path appended to the base directories. + * Reads the directory at the given path appended to the base directories + * from the cache. * * @see readDir * @@ -75,7 +75,7 @@ /* * other stuff */ - + /** The digilib name of the parent directory. * * Returns null if there is no parent. @@ -126,12 +126,12 @@ // array of base dirs Directory[] dirs = new Directory[nb]; // the first directory has to exist - dir = new File(baseDirNames[0], dirName); + dir = new File(baseDirNames[0], dirName); if (dir.isDirectory()) { // fill array with the remaining directories for (int j = 1; j < nb; j++) { - File d = new File(baseDirNames[j], dirName); + File d = new File(baseDirNames[j], dirName); if (d.isDirectory()) { dirs[j] = new Directory(d); } @@ -256,10 +256,10 @@ public void readParentMeta() { // check the parent directories for additional file meta Directory dd = parent; - String path = dir.getName() ; + String path = dir.getName(); while (dd != null) { - if (((DocuDirectory)dd).hasUnresolvedFileMeta()) { - readFileMeta(((DocuDirectory)dd).unresolvedFileMeta, path); + if (((DocuDirectory) dd).hasUnresolvedFileMeta()) { + readFileMeta(((DocuDirectory) dd).unresolvedFileMeta, path); } // prepend parent dir path path = dd.dir.getName() + "/" + path;
--- a/servlet/src/digilib/servlet/DigilibConfiguration.java Wed Sep 03 00:58:37 2003 +0200 +++ b/servlet/src/digilib/servlet/DigilibConfiguration.java Wed Sep 03 21:06:25 2003 +0200 @@ -176,7 +176,7 @@ */ // basedir-list - if (key == "basedir-list") { + if (key.equals("basedir-list")) { // split list into directories String[] sa = FileOps.pathToArray(val); if (sa != null) {
--- a/servlet/src/digilib/servlet/Scaler.java Wed Sep 03 00:58:37 2003 +0200 +++ b/servlet/src/digilib/servlet/Scaler.java Wed Sep 03 21:06:25 2003 +0200 @@ -58,7 +58,7 @@ public class Scaler extends HttpServlet { // digilib servlet version (for all components) - public static final String dlVersion = "1.16a1"; + public static final String dlVersion = "1.16a2"; // Utils instance with debuglevel Utils util; @@ -768,7 +768,7 @@ */ } // end of "big" try - catch (FileOpException e) { + catch (IOException e) { util.dprintln(1, "ERROR: File IO Error: " + e); try { if (errorMsgHtml) {