View on GitHub

fj-doc

Venus - Fugerit Document Generation Framework (fj-doc)

Fugerit Document Generation Framework (fj-doc)

Doc type validation utilities (fj-doc-val)

back to fj-doc index

Maven Central javadoc

Description :
This module offer validation utilities to check content of files and streams based on type.

Status :
Offer basic support for validating jpg, png, tiff, pdf and p7m

Since : fj-doc 0.8

ChangeLog

Quickstart : Created the facade and use it :

	String extension = ...;
	InputStream stream = ...;
	// add the validators you eant, included custom validators : 
	DocValidatorFacade facade = DocValidatorFacade.newFacadeStrict( 
			PdfboxValidator.DEFAULT,
			ImageValidator.JPG_VALIDATOR,
			ImageValidator.PNG_VALIDATOR
	);
	boolean isValidType = facade.checkByExtension(extension, stream);