Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfbox.pdmodel.common.function
Class PDStreamFunction

    java.lang.Object
      org.pdfbox.pdmodel.common.function.PDFunction
          org.pdfbox.pdmodel.common.function.PDStreamFunction

All Implemented Interfaces:
  COSObjectable

Direct Known Subclasses:
  PDFunctionType0, PDFunctionType4

public abstract class PDStreamFunction
extends PDFunction

This class represents a function in a PDF document.

Version:
  $Revision: 1.3 $
Author:
  Ben Litchfield

Constructor Summary
`protected` | `PDStreamFunction(PDDocument doc, int functionType)` Constructor to create a new blank function, should only be called by subclasses.
`` | `PDStreamFunction(PDStream functionDictionary)` Constructor.

Method Summary
`COSBase` | `getCOSObject()` Convert this standard java object to a COS object.
`COSStream` | `getCOSStream()` This will get the underlying array value.
`PDRange` | `getDomainForInput(int n)` This will get the range for a certain input parameter.
`int` | `getNumberOfInputParameters()` This will get the number of input parameters that have a domain specified.
`int` | `getNumberOfOutputParameters()` This will get the number of output parameters that have a range specified.
`PDRange` | `getRangeForOutput(int n)` This will get the range for a certain output parameters.
`void` | `setDomainForInput(PDRange range, int n)` This will set the domain for the input values.
`void` | `setRangeForOutput(PDRange range, int n)` This will set the a range for output parameter.

Methods inherited from class org.pdfbox.pdmodel.common.function.PDFunction
`create`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PDStreamFunction

    protected PDStreamFunction(PDDocument doc,
                               int functionType)

  Constructor to create a new blank function, should only be called by subclasses.

Parameters:
  `doc` - The document that this function is part of.
  `functionType` - An integer describing the function type, only 0,2,3,4 are defined by the PDF sepc.

### PDStreamFunction

    public PDStreamFunction(PDStream functionDictionary)

  Constructor.

Parameters:
  `functionDictionary` - The prepopulated function dictionary.

Method Detail

### getCOSObject

    public COSBase getCOSObject()

  Convert this standard java object to a COS object.

  Returns:
    The cos object that matches this Java object.

### getCOSStream

    public COSStream getCOSStream()

  This will get the underlying array value.

  Returns:
    The cos object that this object wraps.

### getNumberOfOutputParameters

    public int getNumberOfOutputParameters()

  This will get the number of output parameters that have a range specified. A range for output parameters is optional so this may return zero for a function that does have output parameters, this will simply return the number that have the rnage specified.

  Specified by:
    `getNumberOfOutputParameters` in class `PDFunction`
  Returns:
    The number of input parameters that have a range specified.

### getRangeForOutput

    public PDRange getRangeForOutput(int n)

  This will get the range for a certain output parameters. This is will never return null. If it is not present then the range 0 to 0 will be returned.

  Specified by:
    `getRangeForOutput` in class `PDFunction`
  Parameters:
    `n` - The output parameter number to get the range for.
  Returns:
    The range for this component.

### setRangeForOutput

    public void setRangeForOutput(PDRange range,
                                  int n)

  This will set the a range for output parameter.

  Specified by:
    `setRangeForOutput` in class `PDFunction`
  Parameters:
    `range` - The new range for the output parameter.
    `n` - The ouput parameter number to set the range for.

### getNumberOfInputParameters

    public int getNumberOfInputParameters()

  This will get the number of input parameters that have a domain specified.

  Specified by:
    `getNumberOfInputParameters` in class `PDFunction`
  Returns:
    The number of input parameters that have a domain specified.

### getDomainForInput

    public PDRange getDomainForInput(int n)

  This will get the range for a certain input parameter. This is will never return null. If it is not present then the range 0 to 0 will be returned.

  Specified by:
    `getDomainForInput` in class `PDFunction`
  Parameters:
    `n` - The parameter number to get the domain for.
  Returns:
    The domain range for this component.

### setDomainForInput

    public void setDomainForInput(PDRange range,
                                  int n)

  This will set the domain for the input values.

  Specified by:
    `setDomainForInput` in class `PDFunction`
  Parameters:
    `range` - The new range for the input.
    `n` - The number of the input parameter to set the domain for.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD