public static void copyFile(InputStream srcStream, String destFile){
		 DataInputStream dis = new DataInputStream(srcStream);
		 FileOutputStream fos = null;
		 try {
			fos = new FileOutputStream(destFile);
			byte[] buffer = new byte[BUFFER_SIZE];
			int bytesRead;

			while ((bytesRead = dis.read(buffer)) != -1)
				fos.write(buffer, 0, bytesRead); // write
		} catch (IOException e) {
			
			e.printStackTrace();
		} finally {
			if(dis != null){
				try {
					dis.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			
			if(fos != null){
				try {
					fos.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
	}