java testing of decode; not done, but may errors with exception handling
now fixed.