The ContentFilter interface is designed to be used by filters that need to process the content of HTTP replies. This interface provides three methods: needsFiltration(), setInputObjectStream(), and setOutputObjectStream(). needsFiltration() is used by the filter system to build a set of filters that are interested in filtering the content corresponding to the HTTP request and reply. After this set of filters is built, the filtering system uses the setInputObjectStream() and setOutputObjectStream() methods to chain the input and output from filter to filter. Figure 4.9 shows the Java code for the ContentFilter interface.