com.google.appengine.api.conversion
Class ConversionOptions

java.lang.Object
  extended by com.google.appengine.api.conversion.ConversionOptions

public final class ConversionOptions
extends java.lang.Object

The options for a conversion following builder pattern. This class also defines default values for most options.


Nested Class Summary
static class ConversionOptions.Builder
          Provides static creation methods for ConversionOptions.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 ConversionOptions firstPage(int firstPage)
          Sets the number of the first page to generate.
 int hashCode()
           
 ConversionOptions imageWidth(int imageWidth)
          Sets the output image width in pixels.
 ConversionOptions lastPage(int lastPage)
          Sets the number of the last page to generate, defaults to the last page of the document.
 ConversionOptions ocrInputLanguage(java.lang.String ocrInputLanguage)
          Sets the language code in BCP 47 format, used by OCR engine to search for language-specific character set.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

imageWidth

public ConversionOptions imageWidth(int imageWidth)
Sets the output image width in pixels. Only applies to conversions that generate image files.

Parameters:
imageWidth - the output image width in pixels
Returns:
this ConversionOptions instance for chaining
Throws:
java.lang.IllegalArgumentException - if imageWidth is not positive

firstPage

public ConversionOptions firstPage(int firstPage)
Sets the number of the first page to generate. Only applies to conversions that generate image files.

Parameters:
firstPage - the number of the first page to generate
Returns:
this ConversionOptions instance for chaining
Throws:
java.lang.IllegalArgumentException - if firstPage is not positive

lastPage

public ConversionOptions lastPage(int lastPage)
Sets the number of the last page to generate, defaults to the last page of the document. Only applies to conversions that generate image files.

Parameters:
lastPage - the number of the last page to generate
Returns:
this ConversionOptions instance for chaining
Throws:
java.lang.IllegalArgumentException - if lastPage is not positive

ocrInputLanguage

public ConversionOptions ocrInputLanguage(java.lang.String ocrInputLanguage)
Sets the language code in BCP 47 format, used by OCR engine to search for language-specific character set.

Parameters:
ocrInputLanguage - the language code used by OCR engine
Returns:
this ConversionOptions instance for chaining
Throws:
java.lang.IllegalArgumentException - if ocrInputLanguage is null, empty or comprises only whitespace characters

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object