@Test public void testPartialRead() throws IOException { assertArrayEquals(HEADER, beanReader.getHeader(true)); final String[] header = PARTIAL_HEADER; for( CustomerStringBean fullCustomer : STRING_CUSTOMERS ) { CustomerBean expectedCustomer = new CustomerBean(); expectedCustomer.setFirstName(fullCustomer.getFirstName()); expectedCustomer.setLastName(fullCustomer.getLastName()); expectedCustomer.setEmail(fullCustomer.getEmail()); assertEquals(expectedCustomer, beanReader.read(CustomerBean.class, header)); } assertNull(beanReader.read(CustomerBean.class, header)); }
public <T> T read(final Class<T> clazz, final String... nameMapping) throws IOException { if( clazz == null ) { throw new NullPointerException("clazz should not be null"); } else if( nameMapping == null ) { throw new NullPointerException("nameMapping should not be null"); } return readIntoBean(instantiateBean(clazz), nameMapping, null); }
CsvBeanReader extends AbstractCsvReader implements ICsvBeanReader { public <T> T read(final Class<T> clazz, final String... nameMapping) throws IOException { if( clazz == null ) { throw new NullPointerException("clazz should not be null"); } else if( nameMapping == null ) { throw new NullPointerException("nameMapping should not be null"); } return readIntoBean(instantiateBean(clazz), nameMapping, null); } }
CsvBeanReader extends AbstractCsvReader implements ICsvBeanReader { public <T> T read(final Class<T> clazz, final String... nameMapping) throws IOException { if( clazz == null ) { throw new NullPointerException("clazz should not be null"); } else if( nameMapping == null ) { throw new NullPointerException("nameMapping should not be null"); } return readIntoBean(instantiateBean(clazz), nameMapping, null); } CsvBeanReader(final Reader reader, final CsvPreference preferences);  CsvBeanReader(final ITokenizer tokenizer, final CsvPreference preferences); }
CsvBeanReader extends AbstractCsvReader implements ICsvBeanReader { public <T> T read(final Class<T> clazz, final String... nameMapping) throws IOException { if( clazz == null ) { throw new NullPointerException("clazz should not be null"); } else if( nameMapping == null ) { throw new NullPointerException("nameMapping should not be null"); } return readIntoBean(instantiateBean(clazz), nameMapping, null); } CsvBeanReader(final Reader reader, final CsvPreference preferences);  CsvBeanReader(final ITokenizer tokenizer, final CsvPreference preferences); T read(final Class<T> clazz, final String... nameMapping); T read(final Class<T> clazz, final String[] nameMapping, final CellProcessor... processors); T read(final T bean, final String... nameMapping); T read(final T bean, final String[] nameMapping, final CellProcessor... processors); }
CsvBeanReader extends AbstractCsvReader implements ICsvBeanReader { public <T> T read(final Class<T> clazz, final String... nameMapping) throws IOException { if( clazz == null ) { throw new NullPointerException("clazz should not be null"); } else if( nameMapping == null ) { throw new NullPointerException("nameMapping should not be null"); } return readIntoBean(instantiateBean(clazz), nameMapping, null); } CsvBeanReader(final Reader reader, final CsvPreference preferences);  CsvBeanReader(final ITokenizer tokenizer, final CsvPreference preferences); T read(final Class<T> clazz, final String... nameMapping); T read(final Class<T> clazz, final String[] nameMapping, final CellProcessor... processors); T read(final T bean, final String... nameMapping); T read(final T bean, final String[] nameMapping, final CellProcessor... processors);  }