Bencode parser and generator in Java