{
//check that file exists
File f = getFile(propertyId, orderNumber);
if (!f.exists())
{
throw new ValueDataNotFoundException("Value data of property with [id=" + propertyId + ", ordernum="
+ orderNumber + "] do not exists.");
}
else
{
//check readability
InputStream is = new FileInputStream(f);
try
{
is.read();
}
finally
{
try
{
is.close();
}
catch (IOException e)
{
if (LOG.isTraceEnabled())
{
LOG.trace("An exception occurred: " + e.getMessage());
}
}
}
}
}
catch (IOException e)
{
throw new ValueDataNotFoundException("Value data of property [id=" + propertyId + ", ordernum=" + orderNumber
+ "] can not be read.");
}
}