Java Encoder samples