/libcore/dex/src/main/java/com/android/dex/util/ |
D | FileUtils.java | 38 File file = new File(fileName); in readFile() local 39 return readFile(file); in readFile() 49 public static byte[] readFile(File file) { in readFile() argument 50 if (!file.exists()) { in readFile() 51 throw new RuntimeException(file + ": file not found"); in readFile() 54 if (!file.isFile()) { in readFile() 55 throw new RuntimeException(file + ": not a file"); in readFile() 58 if (!file.canRead()) { in readFile() 59 throw new RuntimeException(file + ": file not readable"); in readFile() 62 long longLength = file.length(); in readFile() [all …]
|
/libcore/tzdata/update/src/main/libcore/tzdata/update/ |
D | FileUtils.java | 99 public static void makeWorldReadable(File file) throws IOException { in makeWorldReadable() argument 100 if (!file.setReadable(true, false /* ownerOnly */)) { in makeWorldReadable() 101 throw new IOException("Unable to make " + file + " world-readable"); in makeWorldReadable() 108 public static long calculateChecksum(File file) throws IOException { in calculateChecksum() argument 111 try (FileInputStream fis = new FileInputStream(file)) { in calculateChecksum() 128 public static void ensureFileDoesNotExist(File file) throws IOException { in ensureFileDoesNotExist() argument 129 if (file.exists()) { in ensureFileDoesNotExist() 130 if (!file.isFile()) { in ensureFileDoesNotExist() 131 throw new IOException(file + " is not a file"); in ensureFileDoesNotExist() 133 doDelete(file); in ensureFileDoesNotExist() [all …]
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | RandomAccessFileTest.java | 30 private File file; field in RandomAccessFileTest 33 file = File.createTempFile("RandomAccessFileTest", "tmp"); in setUp() 37 file.delete(); in tearDown() 41 RandomAccessFile raf = new RandomAccessFile(file, "rw"); in testSeekTooLarge() 50 RandomAccessFile raf = new RandomAccessFile(file, "rw"); in testSetLengthTooLarge() 59 RandomAccessFile raf = new RandomAccessFile(file, "rw"); in testSetLength64() 61 assertEquals(0, file.length()); in testSetLength64() 64 assertEquals(moreThanFourGig, file.length()); in testSetLength64() 72 File file = File.createTempFile("RandomAccessFileTest", "tmp"); in testRandomAccessFileHasCleanupFinalizer() local 74 createRandomAccessFile(file); in testRandomAccessFileHasCleanupFinalizer() [all …]
|
D | OldAndroidFileTest.java | 28 File file = File.createTempFile(String.valueOf(System.currentTimeMillis()), null, null); in testFile() local 30 assertTrue(file.exists()); in testFile() 31 assertTrue(file.delete()); in testFile() 32 assertFalse(file.exists()); in testFile()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | ProcessBuilder.java | 474 public File file() { return null; } in file() method in ProcessBuilder.Redirect 496 public static Redirect from(final File file) { in from() argument 497 if (file == null) in from() 501 public File file() { return file; } in from() method in ProcessBuilder.Redirect 503 return "redirect to read from file \"" + file + "\""; in from() 522 public static Redirect to(final File file) { in to() argument 523 if (file == null) in to() 527 public File file() { return file; } in to() method 529 return "redirect to write to file \"" + file + "\""; in to() 552 public static Redirect appendTo(final File file) { [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | OpenRandomFileTest.java | 37 File file = File.createTempFile("test", "tmp"); in testOpenNonEmptyFile() local 38 assertTrue(file.exists()); in testOpenNonEmptyFile() 39 file.deleteOnExit(); in testOpenNonEmptyFile() 40 FileOutputStream fos = new FileOutputStream(file); in testOpenNonEmptyFile() 44 String fileName = file.getCanonicalPath(); in testOpenNonEmptyFile() 50 File file = File.createTempFile("test", "tmp"); in testOpenEmptyFile() local 51 assertTrue(file.exists()); in testOpenEmptyFile() 52 file.deleteOnExit(); in testOpenEmptyFile() 54 String fileName = file.getCanonicalPath(); in testOpenEmptyFile()
|
/libcore/dalvik/src/main/java/dalvik/system/profiler/ |
D | HprofBinaryToAscii.java | 54 File file = new File(args[0]); in convert() local 55 if (!file.exists()) { in convert() 56 usage("file " + file + " does not exist"); in convert() 60 if (startsWithMagic(file)) { in convert() 63 hprofData = readHprof(file); in convert() 66 + file + ": " + e.getMessage()); in convert() 74 hprofData = readSnapshot(file); in convert() 77 + file + ": " + e.getMessage()); in convert() 88 private static boolean startsWithMagic(File file) { in startsWithMagic() argument 91 inputStream = new DataInputStream(new BufferedInputStream(new FileInputStream(file))); in startsWithMagic() [all …]
|
/libcore/ojluni/src/main/java/sun/net/www/protocol/mailto/ |
D | Handler.java | 121 String file = ""; in parseURL() local 124 file = spec.substring(start, limit); in parseURL() 130 if (file == null || file.equals("")) in parseURL() 134 for (int i = 0; i < file.length(); i++) in parseURL() 135 if (!Character.isWhitespace(file.charAt(i))) in parseURL() 142 setURL(u, protocol, host, port, file, null); in parseURL()
|
/libcore/tzdata/tools/ |
D | tzupdate.properties | 7 bionic.file= 8 icu.file= 10 # Edit these as required to point to the file expected to exist on the device. 11 checksum.file.local.1=../../../bionic/libc/zoneinfo/tzdata 12 checksum.file.ondevice.1=/system/usr/share/zoneinfo/tzdata 13 checksum.file.local.2=../../../external/icu/icu4c/source/stubdata/icudt55l.dat 14 checksum.file.ondevice.2=/system/usr/icu/icudt55l.dat
|
/libcore/ojluni/src/main/java/java/net/ |
D | URL.java | 177 private String file; field in URL 303 public URL(String protocol, String host, int port, String file) in URL() argument 306 this(protocol, host, port, file, null); in URL() 327 public URL(String protocol, String host, String file) in URL() argument 329 this(protocol, host, -1, file); in URL() 371 public URL(String protocol, String host, int port, String file, in URL() argument 402 Parts parts = new Parts(file, host); in URL() 407 this.file = path + "?" + query; in URL() 409 this.file = path; in URL() 582 file = context.file; in URL() [all …]
|
/libcore/ojluni/src/main/java/sun/net/www/protocol/file/ |
D | FileURLConnection.java | 32 package sun.net.www.protocol.file; 58 File file; field in FileURLConnection 67 protected FileURLConnection(URL u, File file) { in FileURLConnection() argument 69 this.file = file; in FileURLConnection() 81 filename = file.toString(); in connect() 82 isDirectory = file.isDirectory(); in connect() 84 String[] fileList = file.list(); in connect() 95 ProgressSource pi = new ProgressSource(url, "GET", file.length()); in connect() 96 is = new MeteredStream(is, pi, file.length()); in connect() 111 exists = file.exists(); in initializeHeaders() [all …]
|
/libcore/ojluni/src/main/java/sun/net/www/protocol/jar/ |
D | Handler.java | 103 String file = u.getFile(); in hashCode() local 104 int sep = file.indexOf(separator); in hashCode() 107 return h + file.hashCode(); in hashCode() 110 String fileWithoutEntry = file.substring(0, sep); in hashCode() 118 String entry = file.substring(sep + 2); in hashCode() 128 String file = null; in parseURL() local 136 file = url.getFile(); in parseURL() 150 file = parseAbsoluteSpec(spec); in parseURL() 152 file = parseContextSpec(url, spec); in parseURL() 155 int bangSlash = indexOfBangSlash(file); in parseURL() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
D | Zip64FileTest.java | 39 final File file = createZipFile(65550, 2, false /* setEntrySize */); in testZip64Support_largeNumberOfEntries() local 42 zf = new ZipFile(file); in testZip64Support_largeNumberOfEntries() 67 final File file = createZipFile(5, 1073741824L, false /* setEntrySize */); in testZip64Support_totalLargerThan4G() local 70 zf = new ZipFile(file); in testZip64Support_totalLargerThan4G() 90 final File file = createZipFile(1, 4294967410L, true /* setEntrySize */); in testZip64Support_hugeEntry() local 93 zf = new ZipFile(file); in testZip64Support_hugeEntry() 108 File file = createTemporaryZipFile(); in createZipFile() local 111 new BufferedOutputStream(new FileOutputStream(file))); in createZipFile() 113 return file; in createZipFile()
|
D | OldAndroidZipStressTest.java | 38 public void checkJarCertificates(File file) throws Exception { in checkJarCertificates() argument 39 JarFile jarFile = new JarFile(file); in checkJarCertificates() 71 for (File file : getFiles()) { in testJarCertificates() 72 checkJarCertificates(file); in testJarCertificates() 81 for (File file : getFiles()) { in testZipStressManifest() 82 System.out.println("ZIP stress test processing " + file + "..."); in testZipStressManifest() 84 ZipFile zip = new ZipFile(file); in testZipStressManifest() 100 for (File file : getFiles()) { in testZipStressAllFiles() 101 System.out.println("ZIP stress test processing " + file + "..."); in testZipStressAllFiles() 102 ZipFile zip = new ZipFile(file); in testZipStressAllFiles()
|
/libcore/ojluni/src/test/ |
D | gen-test-list | 65 local file 66 for file in $test_property_files; do 67 debug_print "File: $file" 69 if ! grep "TestNG.dirs" "$file" > /dev/null; then 75 list_classes_in_dir "$(dirname "$file")"
|
D | artrun | 38 file="$BASH_SOURCE" 40 file="$0" 42 while [ -h "$file" ]; do 44 file="$(readlink "$file")" 46 echo "$file"
|
/libcore/ojluni/src/main/java/java/io/ |
D | FileWriter.java | 89 public FileWriter(File file) throws IOException { in FileWriter() argument 90 super(new FileOutputStream(file)); in FileWriter() 106 public FileWriter(File file, boolean append) throws IOException { in FileWriter() argument 107 super(new FileOutputStream(file, append)); in FileWriter()
|
/libcore/harmony-tests/src/test/resources/resources/ |
D | test.rtf | 3 * contributor license agreements. See the NOTICE file distributed with 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 18 /* A bogus RTF file used to see if we can detect 19 * file type based on its file extension.
|
D | test.doc | 3 * contributor license agreements. See the NOTICE file distributed with 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 18 /* A bogus doc file used to see if we can detect 19 * file type based on its file extension.
|
/libcore/benchmarks/src/benchmarks/ |
D | ZipFileBenchmark.java | 33 private File file; field in ZipFileBenchmark 39 file = File.createTempFile(getClass().getName(), ".zip"); in setUp() 40 file.deleteOnExit(); in setUp() 41 writeEntries(new ZipOutputStream(new FileOutputStream(file)), numEntries, 0); in setUp() 42 ZipFile zipFile = new ZipFile(file); in setUp() 51 ZipFile zf = new ZipFile(file); in timeZipFileOpen()
|
D | BufferedZipFileBenchmark.java | 34 private File file; field in BufferedZipFileBenchmark 39 file = File.createTempFile(getClass().getName(), ".zip"); in setUp() 40 file.deleteOnExit(); in setUp() 43 ZipOutputStream out = new ZipOutputStream(new FileOutputStream(file)); in setUp() 58 ZipFile zipFile = new ZipFile(file); in timeUnbufferedRead() 71 ZipFile zipFile = new ZipFile(file); in timeBufferedRead()
|
/libcore/ojluni/src/main/java/sun/net/www/ |
D | ParseUtil.java | 229 public String canonizeString(String file) { in canonizeString() argument 231 int lim = file.length(); in canonizeString() 234 while ((i = file.indexOf("/../")) >= 0) { in canonizeString() 235 if ((lim = file.lastIndexOf('/', i - 1)) >= 0) { in canonizeString() 236 file = file.substring(0, lim) + file.substring(i + 3); in canonizeString() 238 file = file.substring(i + 3); in canonizeString() 242 while ((i = file.indexOf("/./")) >= 0) { in canonizeString() 243 file = file.substring(0, i) + file.substring(i + 2); in canonizeString() 246 while (file.endsWith("/..")) { in canonizeString() 247 i = file.indexOf("/.."); in canonizeString() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/ |
D | ZipFileTest.java | 45 File file = new File(tempFileName); in test_ConstructorLjava_io_FileI() local 46 ZipFile zip = new ZipFile(file, ZipFile.OPEN_DELETE | ZipFile.OPEN_READ); in test_ConstructorLjava_io_FileI() 48 assertTrue("Zip should not exist", !file.exists()); in test_ConstructorLjava_io_FileI() 50 file = new File(tempFileName); in test_ConstructorLjava_io_FileI() 52 zip = new ZipFile(file, ZipFile.OPEN_READ); in test_ConstructorLjava_io_FileI() 57 file = new File(tempFileName); in test_ConstructorLjava_io_FileI() 59 zip = new ZipFile(file, -1); in test_ConstructorLjava_io_FileI() 74 File file = File.createTempFile("zip", "tmp"); in test_ConstructorLjava_lang_String() local 76 zip = new ZipFile(file.getAbsolutePath()); in test_ConstructorLjava_lang_String() 81 file.delete(); in test_ConstructorLjava_lang_String() [all …]
|
/libcore/ojluni/src/main/native/ |
D | UnixFileSystem_md.c | 138 jobject file, jint a) in Java_java_io_UnixFileSystem_checkAccess0() argument 157 WITH_FIELD_PLATFORM_STRING(env, file, ids.path, path) { in Java_java_io_UnixFileSystem_checkAccess0() 168 jobject file, in Java_java_io_UnixFileSystem_setPermission0() argument 175 WITH_FIELD_PLATFORM_STRING(env, file, ids.path, path) { in Java_java_io_UnixFileSystem_setPermission0() 215 jobject file) in Java_java_io_UnixFileSystem_getLastModifiedTime0() argument 219 WITH_FIELD_PLATFORM_STRING(env, file, ids.path, path) { in Java_java_io_UnixFileSystem_getLastModifiedTime0() 231 jobject file) in Java_java_io_UnixFileSystem_getLength0() argument 235 WITH_FIELD_PLATFORM_STRING(env, file, ids.path, path) { in Java_java_io_UnixFileSystem_getLength0() 276 jobject file) in Java_java_io_UnixFileSystem_delete0() argument 280 WITH_FIELD_PLATFORM_STRING(env, file, ids.path, path) { in Java_java_io_UnixFileSystem_delete0() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/logging/ |
D | OldFileHandlerTest.java | 73 File file = new File(TEMPPATH + SEP + "log"); in setUp() local 74 file.mkdir(); in setUp() 171 File file = new File(TEMPPATH + SEP + "log"); in testFileHandler_1params() local 172 assertTrue("length list of file is incorrect", file.list().length <= 2); in testFileHandler_1params() 185 file = new File(TEMPPATH + SEP + "log"); in testFileHandler_1params() 186 assertTrue("length list of file is incorrect", file.list().length <= 2); in testFileHandler_1params() 390 File file; in reset() local 392 file = new File(homepath + SEP + filename); in reset() 393 if (file.isFile()) { in reset() 394 file.delete(); in reset() [all …]
|