public static byte[] fileToByte(String filePath) throws IOException{
byte[] bytes = null;
FileInputStream fis = null;
try{
File file = new File(filepath);
fis = new FileInputStream(file);
bytes = new bytes[(int) file.length()];
fis.read(bytes);
}catch(IOException e){
e.printStackTrace();
throw e;
}finally{
fis.close();
}
return bytes;
}