class ValidatingObjectInputStream extends ObjectInputStream {

    public ValidatingObjectInputStream accept(Class<?>... classes) {
        for (Class<?> c : classes) {
            acceptMatchers.add(new FullClassNameMatcher(c.getName()));
        }
        return this;
    }

    public  ValidatingObjectInputStream(InputStream input);

}