org.apache.cocoon.components.source.impl
Class GIFSourceInspector
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.components.source.impl.AbstractImageSourceInspector
org.apache.cocoon.components.source.impl.GIFSourceInspector
- All Implemented Interfaces:
- Component, LogEnabled, ThreadSafe, SourceInspector
public class GIFSourceInspector
- extends AbstractImageSourceInspector
- implements ThreadSafe
This source inspector adds extra attributes for image files.
- Version:
- CVS $Id: GIFSourceInspector.html 1304258 2012-03-23 10:09:27Z ilgrosso $
- Author:
- Stephan Michels, Donald A. Ball Jr.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GIFSourceInspector
public GIFSourceInspector()
isImageMimeType
protected final boolean isImageMimeType(Source source)
- Checks the source uri for the .gif extension.
- Specified by:
isImageMimeType
in class AbstractImageSourceInspector
- Parameters:
source
- the Source to test
isImageFileType
protected final boolean isImageFileType(Source source)
throws SourceException
- Checks that this is in fact a gif file.
- Specified by:
isImageFileType
in class AbstractImageSourceInspector
- Parameters:
source
- the Source to test
- Throws:
SourceException
getImageSize
protected final int[] getImageSize(Source source)
throws SourceException
- Returns width as first element, height as second
- Specified by:
getImageSize
in class AbstractImageSourceInspector
- Parameters:
source
- the Source to inspect.
- Returns:
- array carrying the calculated width parameter
in its 0 index, the height under index 1.
- Throws:
SourceException
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.