byte[] newBytes = new byte[oldBytes.length];
System.arraycopy(oldBytes, 0, newBytes, 0, newBytes.length);
try
{
return new EditableValueData(newBytes, oldValue.getOrderNumber(), null, -1, null);
}
catch (IOException e)
{
throw new RepositoryException(e);
}
}
else
{
// edited BLOB file, make a copy
try
{
EditableValueData copy =
new EditableValueData(oldValue.getAsStream(), oldValue.getOrderNumber(), null, -1, null);
return copy;
}
catch (FileNotFoundException e)
{
throw new RepositoryException("Create editable copy error. " + e, e);