You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AbstractImageReader.java 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * $Id$
  3. * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  4. * For details on use and redistribution please refer to the
  5. * LICENSE file included with these sources.
  6. */
  7. package org.apache.fop.image.analyser;
  8. // Java
  9. import java.io.BufferedInputStream;
  10. import java.io.IOException;
  11. import org.apache.fop.fo.FOUserAgent;
  12. /**
  13. * Base class implementing ImageReader.
  14. * @author Pankaj Narula
  15. * @version 1.0
  16. * @see ImageReader
  17. */
  18. public abstract class AbstractImageReader implements ImageReader {
  19. /**
  20. * Image width.
  21. */
  22. protected int width = 0;
  23. /**
  24. * Image height.
  25. */
  26. protected int height = 0;
  27. /**
  28. * Image stream.
  29. */
  30. protected BufferedInputStream imageStream = null;
  31. public abstract boolean verifySignature(String uri,
  32. BufferedInputStream fis, FOUserAgent ua) throws IOException;
  33. public int getHeight() {
  34. return this.height;
  35. }
  36. public int getWidth() {
  37. return this.width;
  38. }
  39. public abstract String getMimeType();
  40. public BufferedInputStream getInputStream() {
  41. return this.imageStream;
  42. }
  43. }