Finished Attribute Encoder functions.
Added a java test file for debugging.