@Override public Object decode(Object input) throws Exception { if (input == null) { return null; } else if (input instanceof Filter) { return input; } else if (input instanceof String) { return decode(IOUtils.toInputStream((String) input)); } else { throw new IllegalArgumentException("Cannot convert " + input + " into a Filter object"); } }
@Override public Object decode(InputStream input) throws Exception { Parser p = getParser(xml); return p.parse(input); }
@Override public Object decode(Object input) throws Exception { if(input == null) { return null; } else if(input instanceof Filter) { return input; } else if(input instanceof String) { return decode(IOUtils.toInputStream((String) input)); } else { throw new IllegalArgumentException("Cannot convert " + input + " into a Filter object"); } }