public static byte[] read(String filePath) throws IOException,
			FileNotFoundException {
		if (filePath == null) {
			return null;
		}
		FileInputStream fis = new FileInputStream(new File(filePath));
		int size = fis.available();
		ByteArrayOutputStream baos = new ByteArrayOutputStream(size);
		byte[] data = null;
		if (size < BUFFER_SIZE) {
			data = new byte[size];
		} else {
			data = new byte[BUFFER_SIZE];
		}
		while (true) {
			int count = fis.read(data);
			if (count == -1) {
				break;
			}
			baos.write(data);
		}
		fis.close();
		return baos.toByteArray();
	}