getObject
Returns the given object in a ByteBuffer.
If the object doesn't exist, throws an IllegalStateException.
Writes the object to the given path.
Replaces any existing file at the given path.
If the object doesn't exist, throws an IllegalStateException.