From bacbe7a0915fbb7b4c22b623f97a11352cf5d0b1 Mon Sep 17 00:00:00 2001 From: Steve Coffman Date: Thu, 26 Oct 2000 14:33:37 +0000 Subject: Adds textdeko.fo file example. Applies Art Welch's JDK 1.1.x compatibility fixes. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193739 13f79535-47bb-0310-9956-ffa450edef68 --- .../fop/image/analyser/ImageReaderFactory.java | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/org/apache/fop/image') diff --git a/src/org/apache/fop/image/analyser/ImageReaderFactory.java b/src/org/apache/fop/image/analyser/ImageReaderFactory.java index f4f36a6df..d811eacb6 100644 --- a/src/org/apache/fop/image/analyser/ImageReaderFactory.java +++ b/src/org/apache/fop/image/analyser/ImageReaderFactory.java @@ -44,8 +44,8 @@ package org.apache.fop.image.analyser; import java.io.InputStream; import java.io.BufferedInputStream; import java.io.IOException; -import java.util.Iterator; -import java.util.ArrayList; +import java.util.Enumeration; +import java.util.Vector; // FOP import org.apache.fop.image.FopImageException; @@ -56,7 +56,7 @@ import org.apache.fop.image.FopImageException; * @version 1.0 */ public class ImageReaderFactory { - static protected ArrayList formats = null; + static protected Vector formats = null; /** * ImageReader maker. @@ -69,20 +69,20 @@ public class ImageReaderFactory { throws FopImageException { // need to use a config file and remove static methods - formats = new ArrayList(); - formats.add(new JPEGReader()); - formats.add(new BMPReader()); - formats.add(new GIFReader()); - formats.add(new PNGReader()); - formats.add(new SVGReader()); + formats = new Vector(); + formats.addElement(new JPEGReader()); + formats.addElement(new BMPReader()); + formats.addElement(new GIFReader()); + formats.addElement(new PNGReader()); + formats.addElement(new SVGReader()); // ImageReader reader; BufferedInputStream bis = new BufferedInputStream(in); - Iterator itr = formats.iterator(); + Enumeration itr = formats.elements(); try { - while (itr.hasNext()) { - reader = (ImageReader) itr.next(); + while (itr.hasMoreElements()) { + reader = (ImageReader) itr.nextElement(); if (reader.verifySignature(bis)) { return reader; } -- cgit v1.2.3