class BinaryDataProvider extends AbstractConfigurableProvider implements MessageBodyReader<T>, MessageBodyWriter<T> {

    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mt) {
        return byte[].class.isAssignableFrom(type)
               || InputStream.class.isAssignableFrom(type)
               || Reader.class.isAssignableFrom(type)
               || File.class.isAssignableFrom(type)
               || StreamingOutput.class.isAssignableFrom(type);
    }

}