org.dspace.app.mediafilter
Class JPEGFilter

java.lang.Object
  extended by org.dspace.app.mediafilter.MediaFilter
      extended by org.dspace.app.mediafilter.JPEGFilter
All Implemented Interfaces:
FormatFilter, SelfRegisterInputFormats

public class JPEGFilter
extends MediaFilter
implements SelfRegisterInputFormats

Filter image bitstreams, scaling the image to be within the bounds of thumbnail.maxwidth, thumbnail.maxheight, the size we want our thumbnail to be no bigger than. Creates only JPEGs.


Constructor Summary
JPEGFilter()
           
 
Method Summary
 String getBundleName()
           
 String getDescription()
           
 InputStream getDestinationStream(InputStream source)
           
 String getFilteredName(String oldFilename)
          Get a filename for a newly created filtered bitstream
 String getFormatString()
           
 String[] getInputDescriptions()
           
 String[] getInputExtensions()
           
 String[] getInputMIMETypes()
           
 
Methods inherited from class org.dspace.app.mediafilter.MediaFilter
postProcessBitstream, preProcessBitstream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPEGFilter

public JPEGFilter()
Method Detail

getFilteredName

public String getFilteredName(String oldFilename)
Description copied from interface: FormatFilter
Get a filename for a newly created filtered bitstream

Specified by:
getFilteredName in interface FormatFilter
Parameters:
oldFilename - name of source bitstream
Returns:
filename generated by the filter - for example, document.pdf becomes document.pdf.txt

getBundleName

public String getBundleName()
Specified by:
getBundleName in interface FormatFilter
Returns:
String bundle name

getFormatString

public String getFormatString()
Specified by:
getFormatString in interface FormatFilter
Returns:
String bitstreamformat

getDescription

public String getDescription()
Specified by:
getDescription in interface FormatFilter
Returns:
String description

getDestinationStream

public InputStream getDestinationStream(InputStream source)
                                 throws Exception
Specified by:
getDestinationStream in interface FormatFilter
Parameters:
source - source input stream
Returns:
InputStream the resulting input stream
Throws:
Exception

getInputMIMETypes

public String[] getInputMIMETypes()
Specified by:
getInputMIMETypes in interface SelfRegisterInputFormats

getInputDescriptions

public String[] getInputDescriptions()
Specified by:
getInputDescriptions in interface SelfRegisterInputFormats

getInputExtensions

public String[] getInputExtensions()
Specified by:
getInputExtensions in interface SelfRegisterInputFormats


Copyright © 2010 DuraSpace. All Rights Reserved.