An easy way to transfer and interpret data across streams in Java