Class StreamValidationProcess
java.lang.Object
org.apache.pdfbox.preflight.process.AbstractProcess
org.apache.pdfbox.preflight.process.StreamValidationProcess
- All Implemented Interfaces:
ValidationProcess
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addStreamLengthValidationError
(PreflightContext context, COSObject cObj, int length, String endStream) protected void
checkDictionaryEntries
(PreflightContext context, COSStream streamObj) Check dictionary entries.protected void
checkFilters
(COSStream stream, PreflightContext context) This method checks if one of declared Filter is LZWdecode.protected void
checkStreamLength
(PreflightContext context, COSObject cObj) private boolean
void
validate
(PreflightContext ctx) void
validateStreamObject
(PreflightContext context, COSObject cObj) Methods inherited from class org.apache.pdfbox.preflight.process.AbstractProcess
addFontError, addValidationError, addValidationErrors
-
Field Details
-
ENDSTREAM
- See Also:
-
-
Constructor Details
-
StreamValidationProcess
public StreamValidationProcess()
-
-
Method Details
-
validate
- Throws:
ValidationException
-
validateStreamObject
public void validateStreamObject(PreflightContext context, COSObject cObj) throws ValidationException - Throws:
ValidationException
-
checkFilters
This method checks if one of declared Filter is LZWdecode. If LZW is found, the result list is updated with an error code.- Parameters:
stream
- the stream to check.context
- the preflight context.
-
readUntilStream
- Throws:
IOException
-
checkStreamLength
protected void checkStreamLength(PreflightContext context, COSObject cObj) throws ValidationException - Throws:
ValidationException
-
checkDictionaryEntries
Check dictionary entries. Only the Length entry is mandatory. In a PDF/A file, F, FFilter and FDecodeParms are forbidden- Parameters:
context
- the preflight context.streamObj
- the stream to check.
-
addStreamLengthValidationError
private void addStreamLengthValidationError(PreflightContext context, COSObject cObj, int length, String endStream)
-