using java to call the decoder