An assignment on Java Encoding Decoding API