CSVTableProvider implements MessageBodyReader<CSVTable>,MessageBodyWriter<CSVTable> { @Override public boolean isReadable(final Class<?> type, final Type genericType, final Annotation[] annotations, final MediaType mediaType) { return CSVTable.class.isAssignableFrom(type); }  @Override boolean isReadable(final Class<?> type, final Type genericType, final Annotation[] annotations, final MediaType mediaType); @Override CSVTable readFrom(final Class<CSVTable> type, final Type genericType, final Annotation[] annotations, final MediaType mediaType, final MultivaluedMap<String, String> httpHeaders, final InputStream entityStream); @Override boolean isWriteable(final Class<?> type, final Type genericType, final Annotation[] annotations, final MediaType mediaType); @Override long getSize(final CSVTable csvRecords, final Class<?> type, final Type genericType, final Annotation[] annotations, final MediaType mediaType); @Override void writeTo(final CSVTable csvTable, final Class<?> type, final Type genericType, final Annotation[] annotations, final MediaType mediaType,
			final MultivaluedMap<String, Object> responseHeaders, final OutputStream entityStream); static final String USE_SEMICOLON_AS_STANDARD_PROPERTY; static final SystemProperty<Boolean> INVERT_ALTERNATE_SEPARATOR; static final String GERMAN_GUESS_PROPERTY; static final SystemProperty<Boolean> USE_GERMAN_SEPARATOR_DETECTION; static final String AUTO_GUESS_PROPERTY; static final SystemProperty<Boolean> USE_SEPARATOR_AUTO_GUESS; }
@Test public void testIsReadable() { Assert.assertTrue(provider.isReadable(CSVTable.class, null, null, MediaType.valueOf("text/csv;header=present"))); Assert.assertTrue(provider.isReadable(CSVTable.class, null, null, MediaType.valueOf("text/csv;charset=iso-8859-1"))); Assert.assertTrue(provider.isReadable(CSVTable.class, null, null, MediaType.valueOf("text/csv;header=present;charset=iso-8859-1"))); Assert.assertTrue(provider.isReadable(CSVTable.class, null, null, MediaType.valueOf("text/csv"))); Assert.assertTrue(provider.isReadable(CSVTable.class, null, null, MediaType.valueOf("text/*"))); Assert.assertTrue(provider.isReadable(CSVTable.class, null, null, MediaType.WILDCARD_TYPE)); Assert.assertFalse(provider.isReadable(CSVTable.class, null, null, MediaType.APPLICATION_ATOM_XML_TYPE)); Assert.assertFalse(provider.isReadable(CSVTable.class, null, null, MediaType.APPLICATION_JSON_TYPE)); }