Lines Matching defs:file
5 * you may not use this file except in compliance with the License.
47 * Parses the first line in a file if exists.
49 * @param file {@link File} the input
50 * @return the integer value of the first line of the file.
52 public static int parseIntValueFromFile(File file) {
54 if (file.exists()) {
56 FileInputStream fstream = new FileInputStream(file);
76 * @param size in bytes of the file to download
89 * Download a given file from a target url to a given destination file.
91 * @param file the {@link File} location where to save to
94 public static boolean DownloadFromUrl(String targetUrl, File file) {
99 Log.d(LOG_TAG, "Downloaded file name:" + file.getAbsolutePath());
108 FileOutputStream fos = new FileOutputStream(file);
112 Log.d(LOG_TAG, "Failed to download file with error: " + e);
119 * Post a given file for a given device and timestamp to the server.
123 * @param file {@link File} to upload
127 File file) {
141 new FilePart("file", file)
148 Log.e(LOG_TAG, "Could not upload file with error: " + e);