I didn't check but probably you won't get any runtime exception if to
mark such a value as an index but no magic will happen. Maps should be
compared using equals() method implementation and sorted (maps
instances) according to compareTo() method.
So my suggestion is to redesign your data model to avoid such use cases.
Sounds like binary objects  could be useful for your use case. You can create cache objects on the fly using BinaryBuilder and they will support field lookups directly from byte array. It's like saving a POJO, but without having a POJO :)
Cache itself can be easily created dynamically as well .