Setting a Filter Factory

A filter factory is a BinaryOperator, which is a function of two operands that chooses the filter for a stream. You can set a filter factory by calling the method ObjectInputFilter.Config.setSerialFilterFactory or specifying it in a system or Security property.

Note:

You can set a filter factory exactly once, either with the method setSerialFilterFactory, in the system property jdk.serialFilterFactory, or in the Security Property jdk.serialFilterFactory.