org.jimageanalyst
Class AbstractImageAnalyzer

java.lang.Object
  extended by org.jimageanalyst.AbstractImageAnalyzer
All Implemented Interfaces:
ImageAnalyzer
Direct Known Subclasses:
AnalyzeBmp, AnalyzeGif, AnalyzeIco, AnalyzeIff, AnalyzeJpeg, AnalyzePcx, AnalyzePng, AnalyzePnm, AnalyzePsd, AnalyzeRas, AnalyzeSwf, AnalyzeTga, AnalyzeTiff, AnalyzeXcf

public abstract class AbstractImageAnalyzer
extends java.lang.Object
implements ImageAnalyzer

Abstract class for making analyzer implementations easier.

Version:
$LastChangedRevision: 2 $
Author:
Oliver J. Siegmar

Constructor Summary
AbstractImageAnalyzer(java.lang.String[] formatNames, java.lang.String mimeType, int headerBufSize, int streamStartPosition)
          Initialize the AbstractImageAnalyzer with all required fields.
 
Method Summary
 java.lang.String[] getFormatNames()
          Returns all format names supported by this analyzer.
 int getHeaderBufSize()
          Returns the amount of bytes required by this analyzer to detect if it is responsible for this image.
 java.lang.String getMimeType()
          Returns the supported mime-type.
 int getStreamStartPosition()
          Returns the position where this analyzer wants to start reading meta data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jimageanalyst.ImageAnalyzer
detectHeader, getInfo
 

Constructor Detail

AbstractImageAnalyzer

public AbstractImageAnalyzer(java.lang.String[] formatNames,
                             java.lang.String mimeType,
                             int headerBufSize,
                             int streamStartPosition)
Initialize the AbstractImageAnalyzer with all required fields.

Parameters:
formatNames - the format names supported by this analyzer
mimeType - the mime-type supported by this analyzer
headerBufSize - the size of the header required for testing if this analyzer is responsible for the given image
streamStartPosition - the stream position where the analyzer wants to start reading
Method Detail

getFormatNames

public java.lang.String[] getFormatNames()
Returns all format names supported by this analyzer.

Specified by:
getFormatNames in interface ImageAnalyzer
Returns:
all format names supported by this analyzer

getMimeType

public java.lang.String getMimeType()
Returns the supported mime-type.

Returns:
the supported mime-type

getStreamStartPosition

public int getStreamStartPosition()
Returns the position where this analyzer wants to start reading meta data.

Specified by:
getStreamStartPosition in interface ImageAnalyzer
Returns:
the position where this analyzer wants to start reading meta data

getHeaderBufSize

public int getHeaderBufSize()
Returns the amount of bytes required by this analyzer to detect if it is responsible for this image.

Specified by:
getHeaderBufSize in interface ImageAnalyzer
Returns:
the amount of bytes required by this analyzer to detect if it is responsible for this image


Copyright © 2006-2007. All Rights Reserved.