org.apache.pdfbox.preflight.xobject

## Class XObjImageValidator

- java.lang.Object
- - org.apache.pdfbox.preflight.xobject.AbstractXObjValidator
  - - org.apache.pdfbox.preflight.xobject.XObjImageValidator

All Implemented Interfaces:
  XObjectValidator

    public class XObjImageValidator
    extends AbstractXObjValidator

This class validates XObject with the Image subtype.

### Field Summary

Fields
`protected org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject` `xImage`

### Fields inherited from class org.apache.pdfbox.preflight.xobject.AbstractXObjValidator

`context, xobject`

### Constructor Summary

Constructors
Constructor and Description
`XObjImageValidator(PreflightContext context, org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject xobj)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `checkAlternates()`
`protected void` `checkBPC()` Valid values are 1, 2, 4 and 8, not 16, see here.
`protected void` `checkColorSpaceAndImageMask()`
`protected void` `checkIntent()`
`protected void` `checkInterpolate()`
`protected void` `checkMandatoryFields()` This method checks if required fields are present.
`void` `validate()` Process the validation of the XObject.

### Methods inherited from class org.apache.pdfbox.preflight.xobject.AbstractXObjValidator

`checkOPI, checkPostscriptXObject, checkReferenceXObject, checkSMask`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### xImage

    protected org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject xImage

### Constructor Detail

#### XObjImageValidator

    public XObjImageValidator(PreflightContext context,
                              org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject xobj)

### Method Detail

#### checkMandatoryFields

    protected void checkMandatoryFields()

Description copied from class: `AbstractXObjValidator`
This method checks if required fields are present.

Specified by:
  `checkMandatoryFields` in class `AbstractXObjValidator`

#### checkAlternates

    protected void checkAlternates()
                            throws ValidationException

Throws:
  `ValidationException`

#### checkInterpolate

    protected void checkInterpolate()

#### checkIntent

    protected void checkIntent()

#### checkBPC

    protected void checkBPC()

Valid values are 1, 2, 4 and 8, not 16, see here.

#### checkColorSpaceAndImageMask

    protected void checkColorSpaceAndImageMask()
                                        throws ValidationException

Throws:
  `ValidationException`

#### validate

    public void validate()
                  throws ValidationException

Description copied from interface: `XObjectValidator`
Process the validation of the XObject.

Specified by:
  `validate` in interface `XObjectValidator`
Overrides:
  `validate` in class `AbstractXObjValidator`
Throws:
  `ValidationException`