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

123

/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.
28 private File file; field in class:RandomAccessFileTest
31 file = File.createTempFile("RandomAccessFileTest", "tmp");
35 file.delete();
39 RandomAccessFile raf = new RandomAccessFile(file, "rw");
48 RandomAccessFile raf = new RandomAccessFile(file, "rw");
57 RandomAccessFile raf = new RandomAccessFile(file, "rw");
59 assertEquals(0, file.length());
62 assertEquals(moreThanFourGig, file.length());
67 // TODO: this always succeeds on the host because our default open file limi
76 createRandomAccessFile(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
29 * An output stream that writes bytes to a file. If the output file exists, it
30 * can be replaced or appended to. If it does not exist, a new file will be
33 * File file = ...
36 * out = new BufferedOutputStream(new FileOutputStream(file));
48 * <p>Use {@link FileWriter} to write characters, as opposed to bytes, to a file.
58 /** The unique file channe
72 FileOutputStream(File file) argument
83 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
33 * An input stream that reads bytes from a file.
35 * File file = ...
38 * in = new BufferedInputStream(new FileInputStream(file));
51 * file.
61 /** The unique file channel. Lazily initialized because it's rarely needed. */
67 * Constructs a new {@code FileInputStream} that reads from {@code file}.
69 * @param file
74 FileInputStream(File file) argument
[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/dalvik/src/main/java/dalvik/system/
H A DDexPathList.java5 * you may not use this file except in compliance with the License.
34 * a {@code .jar} or {@code .zip} file containing an optional
35 * top-level {@code classes.dex} file as well as arbitrary resources,
36 * or a plain {@code .dex} file (with no possibility of associated
136 * Splits the given path strings into file elements using the path
139 * file or a directory (as specified). Either string may be empty
166 File file = new File(s);
168 if (! (file.exists() && file.canRead())) {
177 if (!file
245 loadDexFile(File file, File optimizedDirectory) argument
378 private final File file; field in class:DexPathList.Element
385 Element(File file, File zip, DexFile dexFile) 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
43 * {@code http://username:password@host:8080/directory/file?query#ref}:
51 * <tr><td>{@link #getFile() File}</td><td>{@code /directory/file?query}</td><td></td></tr>
52 * <tr><td>{@link #getPath() Path}</td><td>{@code /directory/file}</td><td></td></tr>
60 * <li><strong>file</strong>: read files from the local filesystem.
90 private String file; field in class:URL
203 public URL(String protocol, String host, String file) throws MalformedURLException { argument
204 this(protocol, host, -1, file, nul
217 URL(String protocol, String host, int port, String file) argument
233 URL(String protocol, String host, int port, String file, URLStreamHandler handler) argument
307 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
30 * archive file or to an entry of such a file. {@code jar:} URLs are specified
53 // the file component of the URL
54 private String file; field in class:JarURLConnection
67 file = url.getFile();
69 if ((sepIdx = file.indexOf("!/")) < 0) {
74 if (file
[all...]
/libcore/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/
H A DFileClientSessionCache.java5 * you may not use this file except in compliance with the License.
46 * This cache creates one file per SSL session using "host.port" for
47 * the file name. Files are created or replaced when session data is put
52 * least-recently-used file. We don't current persist the last access time,
120 * Gets the file name for the given host and port.
137 File file = accessOrder.get(name);
139 if (file == null) {
152 // The file is on disk but not in accessOrder yet.
153 file = new File(directory, name);
154 accessOrder.put(name, file);
177 logReadError(String host, File file, Throwable t) argument
289 delete(File file) argument
296 logWriteError(String host, File file, Throwable t) argument
[all...]
H A DTrustedCertificateStore.java5 * you may not use this file except in compliance with the License.
69 * efficient lookup operations for CAs again based on the file naming
83 * configuration in the system/core/rootdir/init.rc file. The
139 File file = fileForAlias(alias);
140 if (file == null || (isUser(alias) && isTombstone(file))) {
143 X509Certificate cert = readCertificate(file);
157 File file;
159 file = new File(systemDir, alias.substring(PREFIX_SYSTEM.length()));
161 file
172 isTombstone(File file) argument
176 readCertificate(File file) argument
195 writeCertificate(File file, X509Certificate cert) argument
538 private File file(File dir, String hash, int index) { method in class:TrustedCertificateStore
[all...]
/libcore/luni/src/main/java/org/apache/harmony/security/provider/crypto/
H A DRandomBitsSupplier.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
75 File file = new File(deviceName);
76 if (file.canRead()) {
77 fis = new FileInputStream(file);
78 randomFile = file;
114 // the below case should not occur because /dev/random or /dev/urandom is a special file
129 // actually there should be no IOException because device is a special file;
/libcore/luni/src/test/java/libcore/java/util/zip/
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...]
H A DOldAndroidZipFileTest.java5 * you may not use this file except in compliance with the License.
39 File file = File.createTempFile("ZipFileTest", ".zip");
41 // create a test file; assume it's not going to collide w/anything
42 FileOutputStream outStream = new FileOutputStream(file);
45 scanZip(file.getPath());
46 read2(file.getPath());
48 file.delete();
84 ZipEntry newEntry = new ZipEntry("file-" + i);
87 newEntry.setComment("this is file " + i);
109 assertEquals(entry.getName(), "file
[all...]
/libcore/luni/src/main/java/libcore/io/
H A DIoUtils.java5 * you may not use this file except in compliance with the License.
139 for (File file : files) {
140 if (file.isDirectory()) {
141 deleteContents(file);
143 if (!file.delete()) {
144 throw new IOException("failed to delete file: " + 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.
102 File file = new File(path);
103 testLength = file.length();
104 testLastModified = file.lastModified();
105 testName = file.getName();
107 testDir = file.isDirectory();
111 in = new FileInputStream(file);
/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/luni/src/test/java/org/apache/harmony/archive/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
51 // the file hyts_zipFile.zip in setup must be included as a resource
84 zfile.close(); // about to reopen the same temp file
85 File file = new File(tempFileName);
86 ZipFile zip = new ZipFile(file, ZipFile.OPEN_DELETE | ZipFile.OPEN_READ);
88 assertTrue("Zip should not exist", !file.exists());
89 file = new File(tempFileName);
90 file
130 test_finalize2(File file) argument
[all...]
/libcore/dalvik/src/main/native/
H A Dsub.mk2 # This file is included by the top-level libcore Android.mk.
/libcore/luni/src/main/java/java/util/jar/
H A DJarFile.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 * The MANIFEST file name.
51 // The entry for the MANIFEST.MF file before it is read.
144 * Create a new {@code JarFile} using the contents of the specified file.
146 * @param file
147 * the JAR file as {@link File}.
149 * If the file cannot be read.
151 public JarFile(File file) throw argument
165 JarFile(File file, boolean verify) argument
186 JarFile(File file, boolean verify, int mode) argument
[all...]

Completed in 3670 milliseconds

123