private void saveToLocal(InputStream in, String filePath) {
		DataOutputStream out =null;	
		try {
				out = new DataOutputStream(new FileOutputStream(new File(filePath)));
				byte[] buffer =new byte[1024];
				int len =-1;
				while((len =in.read(buffer)) !=-1){
					out.write(buffer, 0, len);
					out.flush();
				}
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			} catch (IOException e) {
				e.printStackTrace();
			} finally {
				if(out !=null){
					try {
						out.close();
					} catch (IOException e) {
						e.printStackTrace();
					}
				}
			}
	}