Changed encode/decode methods to use the ones listed here:
http://developeriq.in/articles/2013/feb/28/embedding-messages-in-digital-images-using-java/

Encodes correctly, but doesn't decode properly. Just -1

Most of the other functionality is there.