public class StreamValidationProcess extends AbstractProcess
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
ENDSTREAM |
Constructor and Description |
---|
StreamValidationProcess() |
Modifier and Type | Method and Description |
---|---|
private void |
addStreamLengthValidationError(PreflightContext context,
COSObject cObj,
int length,
java.lang.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 |
readUntilStream(java.io.InputStream ra) |
void |
validate(PreflightContext ctx) |
void |
validateStreamObject(PreflightContext context,
COSObject cObj) |
addFontError, addValidationError, addValidationErrors
private static final java.lang.String ENDSTREAM
public void validate(PreflightContext ctx) throws ValidationException
ValidationException
public void validateStreamObject(PreflightContext context, COSObject cObj) throws ValidationException
ValidationException
protected void checkFilters(COSStream stream, PreflightContext context)
stream
- the stream to check.context
- the preflight context.private boolean readUntilStream(java.io.InputStream ra) throws java.io.IOException
java.io.IOException
protected void checkStreamLength(PreflightContext context, COSObject cObj) throws ValidationException
ValidationException
protected void checkDictionaryEntries(PreflightContext context, COSStream streamObj)
context
- the preflight context.streamObj
- the stream to check.private void addStreamLengthValidationError(PreflightContext context, COSObject cObj, int length, java.lang.String endStream)