An easy way to transfer and interpret data in Java