* Parses the input string and returns a newly created ResourceKey based on the string data
*/
public ResourceKey deserialize(final ResourceKey bundleKey, String stringKey) throws ResourceKeyCreationException
{
// Parse the data
final ResourceKeyData keyData = ResourceKeyUtils.parse(stringKey);
// Validate the data
if (SCHEMA_NAME.equals(keyData.getSchema()) == false)
{
throw new ResourceKeyCreationException("Serialized version of key does not contain correct schema");
}
final String identifier = keyData.getIdentifier();
final char[] chars = identifier.toCharArray();
final byte[] data = new byte[chars.length];
for (int i = 0; i < chars.length; i++)
{
data[i] = (byte) chars[i];
}
return createKey(data, keyData.getFactoryParameters());
}