ByteConverter implements ITypeConverter<Byte> { @Override public Byte convert(String value) { try { return numberFormat.parse(value).byteValue(); } catch(Exception e) { throw new RuntimeException(e); } } ByteConverter();  ByteConverter(NumberFormat numberFormat); @Override Byte convert(String value); @Override Type getTargetType(); @Override String toString();  }
@Test public void testConvert() throws Exception { byte val = new ByteConverter().convert("2"); Assert.assertEquals(2, val); }