private byte[] getFileContent(File file) {

		//TODO test file size

		byte[] buffer = new byte[(int) file.length()];
		InputStream ios = null;
		try {
			ios = new FileInputStream(file);
			if ( ios.read(buffer) == -1 ) {
				throw new IOException("EOF reached while trying to read the whole file");
			}        
		} catch (FileNotFoundException e) {
			e.printStackTrace();
			return null;
		} catch (IOException e) {
			e.printStackTrace();
			return null;
		} finally { 
			try {
				if ( ios != null ) 
					ios.close();
			} catch ( IOException e) {
			}
		}

		return buffer;
	}