Returns the contents of the given file as a byte array.
00025 {
00026 InputStream stream = null;
00027 try {
00028 stream = new BufferedInputStream(new FileInputStream(file));
00029 return getInputStreamAsByteArray(stream, (int) file.length());
00030 } finally {
00031 if (stream != null) {
00032 try {
00033 stream.close();
00034 } catch (IOException e) {
00035 }
00036 }
00037 }
00038 }