/** * Sets a value using an explicit class. This is useful if the value used is a subclass, but the * more general type should be used for storing. */ public <S extends Serializable, T extends S> void setValue(T value, Class<S> explicitClass) throws StorageException { try { store.putWithString(explicitClass.getName(), SerializationUtils.serializeToByteArray(value)); } catch (IOException e) { throw new StorageException(e); } }