Searched refs:file (Results 1 - 25 of 94) sorted by relevance

1234

/libcore/luni/src/main/java/libcore/net/url/
H A DJarHandler.java3 * 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
28 * Returns a connection to the jar file pointed by this <code>URL</code>
29 * in the file system
58 String file = url.getFile();
59 if (file == null) {
60 file = "";
67 if (spec.indexOf("!/") == -1 && (file.indexOf("!/") == -1)) {
70 if (file
[all...]
/libcore/luni/src/test/java/libcore/java/io/
H A DOldAndroidFileTest.java5 * you may not use this file except in compliance with the License.
23 * Checks creation and deletion of a file.
28 File file = File.createTempFile(String.valueOf(System.currentTimeMillis()), null, null);
30 assertTrue(file.exists());
31 assertTrue(file.delete());
32 assertFalse(file.exists());
H A DRandomAccessFileTest.java5 * you may not use this file except in compliance with the License.
30 private File file; field in class:RandomAccessFileTest
33 file = File.createTempFile("RandomAccessFileTest", "tmp");
37 file.delete();
41 RandomAccessFile raf = new RandomAccessFile(file, "rw");
50 RandomAccessFile raf = new RandomAccessFile(file, "rw");
59 RandomAccessFile raf = new RandomAccessFile(file, "rw");
61 assertEquals(0, file.length());
64 assertEquals(moreThanFourGig, file.length());
69 // TODO: this always succeeds on the host because our default open file limi
133 createRandomAccessFile(File file) argument
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DOpenRandomFileTest.java2 * contributor license agreements. See the NOTICE file distributed with
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
37 File file = File.createTempFile("test", "tmp");
38 assertTrue(file.exists());
39 file.deleteOnExit();
40 FileOutputStream fos = new FileOutputStream(file);
44 String fileName = file.getCanonicalPath();
50 File file = File.createTempFile("test", "tmp");
51 assertTrue(file
[all...]
/libcore/dex/src/main/java/com/android/dex/util/
H A DFileUtils.java5 * you may not use this file except in compliance with the License.
31 * Reads the named file, translating {@link IOException} to a
34 * @param fileName {@code non-null;} name of the file to read
35 * @return {@code non-null;} contents of the file
38 File file = new File(fileName);
39 return readFile(file);
43 * Reads the given file, translating {@link IOException} to a
46 * @param file {@code non-null;} the file to read
47 * @return {@code non-null;} contents of the file
49 readFile(File file) argument
[all...]
/libcore/luni/src/main/java/java/io/
H A DFileWriter.java3 * 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
21 * A specialized {@link Writer} that writes to a file in the file system.
34 * Creates a FileWriter using the File {@code file}.
36 * @param file
39 * if {@code file} cannot be opened for writing.
41 public FileWriter(File file) throws IOException { argument
42 super(new FileOutputStream(file));
57 FileWriter(File file, boolean append) argument
[all...]
H A DFileReader.java3 * 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
21 * A specialized {@link Reader} that reads from a file in the file system.
34 * Constructs a new FileReader on the given {@code file}.
36 * @param file
39 * if {@code file} does not exist.
41 public FileReader(File file) throws FileNotFoundException { argument
42 super(new FileInputStream(file));
[all...]
H A DFileOutputStream.java3 * 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
28 * An output stream that writes bytes to a file. If the output file exists, it
29 * can be replaced or appended to. If it does not exist, a new file will be
32 * File file = ...
35 * out = new BufferedOutputStream(new FileOutputStream(file));
47 * <p>Use {@link FileWriter} to write characters, as opposed to bytes, to a file.
57 /** The unique file channe
71 FileOutputStream(File file) argument
82 FileOutputStream(File file, boolean append) argument
[all...]
H A DFileInputStream.java3 * 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
31 * An input stream that reads bytes from a file.
33 * File file = ...
36 * in = new BufferedInputStream(new FileInputStream(file));
49 * file.
59 /** The unique file channel. Lazily initialized because it's rarely needed. */
65 * Constructs a new {@code FileInputStream} that reads from {@code file}.
67 * @param file
72 FileInputStream(File file) argument
[all...]
/libcore/tzdata/update/src/main/libcore/tzdata/update/
H A DFileUtils.java5 * you may not use this file except in compliance with the License.
40 * the resulting file would exist beneath {@code parentDir}. Useful if {@code name} could
43 * @throws java.io.IOException if the file would not exist beneath {@code parentDir}
99 public static void makeWorldReadable(File file) throws IOException { argument
100 if (!file.setReadable(true, false /* ownerOnly */)) {
101 throw new IOException("Unable to make " + file + " world-readable");
106 * Calculates the checksum from the contents of a file.
108 public static long calculateChecksum(File file) throws IOException { argument
111 try (FileInputStream fis = new FileInputStream(file)) {
128 public static void ensureFileDoesNotExist(File file) throw argument
137 doDelete(File file) argument
143 isSymlink(File file) argument
184 readLines(File file) argument
[all...]
H A DTzDataBundleInstaller.java5 * you may not use this file except in compliance with the License.
113 Slog.i(logTag, "Verifying system file checksums");
127 File file = new File(filePath);
128 if (!file.exists()) {
129 Slog.i(logTag, "Failed checksum test for file: " + file + ": file not found");
132 long actualChecksum = FileUtils.calculateChecksum(file);
134 Slog.i(logTag, "Failed checksum test for file: " + file
[all...]
/libcore/dalvik/src/main/java/dalvik/system/profiler/
H A DHprofBinaryToAscii.java5 * you may not use this file except in compliance with the License.
45 * Reads single file from arguments and attempts to read it as
46 * either a binary hprof file or a version with a text header.
51 usage("binary hprof file argument expected");
54 File file = new File(args[0]);
55 if (!file.exists()) {
56 usage("file " + file + " does not exist");
60 if (startsWithMagic(file)) {
63 hprofData = readHprof(file);
88 startsWithMagic(File file) argument
103 readHprof(File file) argument
117 readSnapshot(File file) argument
[all...]
/libcore/luni/src/main/java/java/net/
H A DURL.java3 * 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
41 * {@code http://username:password@host:8080/directory/file?query#ref}:
49 * <tr><td>{@link #getFile() File}</td><td>{@code /directory/file?query}</td><td></td></tr>
50 * <tr><td>{@link #getPath() Path}</td><td>{@code /directory/file}</td><td></td></tr>
58 * <li><strong>file</strong>: read files from the local filesystem.
88 private String file; field in class:URL
201 public URL(String protocol, String host, String file) throws MalformedURLException { argument
202 this(protocol, host, -1, file, nul
215 URL(String protocol, String host, int port, String file) argument
231 URL(String protocol, String host, int port, String file, URLStreamHandler handler) argument
305 set(String protocol, String host, int port, String file, String ref) argument
[all...]
H A DJarURLConnection.java3 * 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
32 * archive file or to an entry of such a file. {@code jar:} URLs are specified
55 // the file component of the URL
56 private String file; field in class:JarURLConnection
69 file = decode(url.getFile());
72 if ((sepIdx = file.indexOf("!/")) < 0) {
75 fileURL = new URL(file
[all...]
/libcore/luni/src/test/java/libcore/java/util/zip/
H A DZip64FileTest.java5 * you may not use this file except in compliance with the License.
36 final File file = createZipFile(65550, 2, false /* setEntrySize */);
39 zf = new ZipFile(file);
54 final File file = createZipFile(5, 1073741824L, false /* setEntrySize */);
57 zf = new ZipFile(file);
77 final File file = createZipFile(1, 4294967410L, true /* setEntrySize */);
80 zf = new ZipFile(file);
95 File file = createTemporaryZipFile();
96 // Don't force a 64 bit zip file to test that our heuristics work.
98 new BufferedOutputStream(new FileOutputStream(file)));
[all...]
H A DOldAndroidZipStressTest.java5 * you may not use this file except in compliance with the License.
38 public void checkJarCertificates(File file) throws Exception { argument
39 JarFile jarFile = new JarFile(file);
71 for (File file : getFiles()) {
72 checkJarCertificates(file);
81 for (File file : getFiles()) {
82 System.out.println("ZIP stress test processing " + file + "...");
84 ZipFile zip = new ZipFile(file);
100 for (File file : getFiles()) {
101 System.out.println("ZIP stress test processing " + file
[all...]
/libcore/benchmarks/src/benchmarks/
H A DBufferedZipFileBenchmark.java5 * you may not use this file except in compliance with the License.
34 private File file; field in class:BufferedZipFileBenchmark
37 file = File.createTempFile(getClass().getName(), ".zip");
38 file.deleteOnExit();
41 ZipOutputStream out = new ZipOutputStream(new FileOutputStream(file));
56 ZipFile zipFile = new ZipFile(file);
69 ZipFile zipFile = new ZipFile(file);
/libcore/support/src/test/java/tests/support/
H A DSupport_TestWebData.java5 * you may not use this file except in compliance with the License.
33 // Although the tests report the content length of this file as being large, a file is created
34 // that is much shorter. Actually creating a large file is not practical during tests. This
35 // file should only be used for checking header information.
110 File file = new File(path);
111 testLength = file.length();
112 testLastModified = file.lastModified();
113 testName = file.getName();
115 testDir = file
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
H A DZipFileTest.java3 * 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
35 // the file hyts_zipFile.zip in setup must be included as a resource
43 zfile.close(); // about to reopen the same temp file
45 File file = new File(tempFileName);
46 ZipFile zip = new ZipFile(file, ZipFile.OPEN_DELETE | ZipFile.OPEN_READ);
48 assertTrue("Zip should not exist", !file.exists());
50 file = new File(tempFileName);
52 zip = new ZipFile(file, ZipFil
88 test_finalize2(File file) argument
[all...]
/libcore/luni/src/main/java/java/lang/
H A DSecurityManager.java3 * 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
52 public void checkDelete(String file) { } argument
81 public void checkRead(String file) { } argument
83 public void checkRead(String file, Object context) { } argument
99 public void checkWrite(String file) { } argument
/libcore/luni/src/test/java/libcore/xml/
H A DDeclarationTest.java5 * you may not use this file except in compliance with the License.
61 File file = File.createTempFile("temp", "xml");
62 file.deleteOnExit();
63 OutputStream out = new FileOutputStream(file);
66 return "file:" + file;
H A DNodeTest.java5 * you may not use this file except in compliance with the License.
49 File file = Support_Resources.resourceToTempFile("/simple.xml");
50 Document document = builder.parse(file);
52 assertFileUriEquals(file, document.getBaseURI());
58 assertFileUriEquals(file, node.getBaseURI());
71 actual.equals("file:" + expectedFile)
72 || actual.equals("file://" + expectedFile));
/libcore/luni/src/test/java/libcore/java/util/logging/
H A DOldFileHandlerTest.java3 * 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
73 File file = new File(TEMPPATH + SEP + "log");
74 file.mkdir();
171 File file = new File(TEMPPATH + SEP + "log");
172 assertTrue("length list of file is incorrect", file.list().length <= 2);
185 file = new File(TEMPPATH + SEP + "log");
186 assertTrue("length list of file i
[all...]
/libcore/dalvik/src/main/java/dalvik/system/
H A DDexPathList.java5 * you may not use this file except in compliance with the License.
41 * a {@code .jar} or {@code .zip} file containing an optional
42 * top-level {@code classes.dex} file as well as arbitrary resources,
43 * or a plain {@code .dex} file (with no possibility of associated
180 * Splits the given path strings into file elements using the path
183 * file or a directory (as specified). Either string may be empty
221 for (File file : files) {
225 String path = file.getPath();
226 String name = file.getName();
232 } else if (file
276 loadDexFile(File file, File optimizedDirectory) argument
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/jar/
H A DJarEntryTest.java3 * 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
87 assertNotNull("Jar file is null", jarFile);
103 File file = null;
106 file = new File(resources, attJarName);
107 attrJar = new JarFile(file);
130 File file = new File(resources, jarFileName);
131 JarFile jarFile = new JarFile(file);
142 assertEquals("the file i
[all...]

Completed in 624 milliseconds

1234