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.

ImageReader.java 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. * ImageReader objects read image headers to determine the image size.
  14. * @author Pankaj Narula
  15. * @version 1.0
  16. */
  17. public interface ImageReader {
  18. /**
  19. * Verify image type.
  20. * @param bis Image buffered input stream
  21. * @return true if image type is the handled one
  22. * @exception IOException io error
  23. */
  24. public boolean verifySignature(String uri, BufferedInputStream bis,
  25. FOUserAgent ua) throws IOException;
  26. /**
  27. * Return the used InputStream.
  28. * @return BufferedInputStream used to verify image type
  29. */
  30. public BufferedInputStream getInputStream();
  31. /**
  32. * Return correspondig mime type.
  33. * @return image mime type
  34. */
  35. public String getMimeType();
  36. /**
  37. * Return the image height.
  38. * @return image height
  39. */
  40. public int getHeight();
  41. /**
  42. * Return the image width.
  43. * @return image width
  44. */
  45. public int getWidth();
  46. }