net.sf.filePiper.processors
Class ImageSizerProcessor

java.lang.Object
  extended by net.sf.filePiper.model.OneToOneByteFileProcessor
      extended by net.sf.filePiper.processors.ImageSizerProcessor
All Implemented Interfaces:
FileProcessor

public class ImageSizerProcessor
extends OneToOneByteFileProcessor

Processor resizing an JPEG image file.

Author:
BEROL

Nested Class Summary
static class ImageSizerProcessor.ImageFormat
           
 
Field Summary
 
Fields inherited from interface net.sf.filePiper.model.FileProcessor
MANY, NONE, ONE
 
Constructor Summary
ImageSizerProcessor()
           
 
Method Summary
 String getProcessorDescription()
           
 String getProcessorName()
           
 String getProposedNameSuffix()
           
 ImageSizerProcessor.ImageFormat getTargetFormat()
           
 int getTargetSize()
           
 void process(InputStream is, OutputStream os, FileProcessorEnvironment env)
           
protected  void setProposedFilePath(InputFileInfo info)
           
 void setTargetFormat(ImageSizerProcessor.ImageFormat newFormat)
           
 void setTargetSize(int newSize)
           
 
Methods inherited from class net.sf.filePiper.model.OneToOneByteFileProcessor
bytesProcessed, endBatch, getCurrentInputFileInfo, getEditor, getOutputCardinality, getProposedExtension, getSettings, getStatusMessage, init, inputFileStarted, linesProcessed, process, setCurrentInputFileInfo, startBatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageSizerProcessor

public ImageSizerProcessor()
Method Detail

getProcessorName

public String getProcessorName()
Specified by:
getProcessorName in interface FileProcessor
Specified by:
getProcessorName in class OneToOneByteFileProcessor
Returns:
A displayable name for this processor.

getProcessorDescription

public String getProcessorDescription()
Overrides:
getProcessorDescription in class OneToOneByteFileProcessor

getTargetSize

public int getTargetSize()

setTargetSize

public void setTargetSize(int newSize)

getTargetFormat

public ImageSizerProcessor.ImageFormat getTargetFormat()

setTargetFormat

public void setTargetFormat(ImageSizerProcessor.ImageFormat newFormat)

getProposedNameSuffix

public String getProposedNameSuffix()
Specified by:
getProposedNameSuffix in class OneToOneByteFileProcessor

setProposedFilePath

protected void setProposedFilePath(InputFileInfo info)
Overrides:
setProposedFilePath in class OneToOneByteFileProcessor

process

public void process(InputStream is,
                    OutputStream os,
                    FileProcessorEnvironment env)
             throws IOException
Specified by:
process in class OneToOneByteFileProcessor
Throws:
IOException


Copyright © 2011. All Rights Reserved.