@Test public void testReadIntoExistingBean() throws IOException { final String[] header = beanReader.getHeader(true); assertArrayEquals(HEADER, header); assertEquals(JOHN_STRING, beanReader.read(new CustomerStringBean(), header)); assertEquals(BOB_STRING, beanReader.read(new CustomerStringBean(), header)); assertEquals(ALICE_STRING, beanReader.read(new CustomerStringBean(), header)); assertEquals(BILL_STRING, beanReader.read(new CustomerStringBean(), header)); assertEquals(MIRANDA_STRING, beanReader.read(new CustomerStringBean(), header)); assertEquals(STEVE_STRING, beanReader.read(new CustomerStringBean(), header)); assertEquals(ADA_STRING, beanReader.read(new CustomerStringBean(), header)); assertEquals(SERGEI_STRING, beanReader.read(new CustomerStringBean(), header)); assertEquals(LARRY_STRING, beanReader.read(new CustomerStringBean(), header)); assertEquals(GRACE_STRING, beanReader.read(new CustomerStringBean(), header)); assertNull(beanReader.read(new CustomerStringBean(), 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);  }