}
return outStream.toByteArray();
} catch (NullPointerException npe) {
String msg = "Failed to find file [" + filename + "].";
_log.error(msg, npe);
throw new InvalidImplementationException(msg, npe);
} catch (FileNotFoundException fe) {
String msg = "Failed to find file [" + filename + "].";
_log.error(msg, fe);
throw new InvalidImplementationException(msg, fe);
} catch (IOException ioe) {
String msg = "Cannot access file [" + filename + "].";
_log.error(ioe, ioe);
throw new InvalidImplementationException(msg, ioe);
} finally {
try {
inStream.close();
} catch (IOException e) {
// do nothing