Bencoding written in Java