Searched defs:file (Results 1 - 25 of 54) sorted by relevance

123

/libcore/ojluni/src/main/java/java/io/
H A DDeleteOnExitHook.java8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
14 * version 2 for more details (a copy is included in the LICENSE file that
32 * A set is used both to prevent double-insertion of the same file as well as offer
51 static synchronized void add(String file) { argument
53 // DeleteOnExitHook is running. Too late to add a file
57 files.add(file);
H A DFileReader.java8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
14 * version 2 for more details (a copy is included in the LICENSE file that
49 * file to read from.
51 * @param fileName the name of the file to read from
52 * @exception FileNotFoundException if the named file does not exist,
53 * is a directory rather than a regular file,
65 * @param file the <tt>File</tt> to read from
66 * @exception FileNotFoundException if the file does not exist,
67 * is a directory rather than a regular file,
71 FileReader(File file) argument
[all...]
H A DFileWriter.java8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
14 * version 2 for more details (a copy is included in the LICENSE file that
35 * <p>Whether or not a file is available or may be created depends upon the
36 * underlying platform. Some platforms, in particular, allow a file to be
37 * opened for writing by only one <tt>FileWriter</tt> (or other file-writing
39 * will fail if the file involved is already open.
55 * Constructs a FileWriter object given a file name.
58 * @throws IOException if the named file exists but is a directory rather
59 * than a regular file, doe
89 FileWriter(File file) argument
106 FileWriter(File file, boolean append) argument
[all...]
H A DFileInputStream.java9 * particular file as subject to the "Classpath" exception as provided
10 * by Oracle in the LICENSE file that accompanied this code.
15 * version 2 for more details (a copy is included in the LICENSE file that
40 * from a file in a file system. What files
51 * @see java.nio.file.Files#newInputStream
57 /* File Descriptor - handle to the open file */
60 /* The path of the referenced file (null if the stream is created with a file descriptor) */
73 * opening a connection to an actual file,
129 FileInputStream(File file) argument
[all...]
H A DFileOutputStream.java9 * particular file as subject to the "Classpath" exception as provided
10 * by Oracle in the LICENSE file that accompanied this code.
15 * version 2 for more details (a copy is included in the LICENSE file that
38 * A file output stream is an output stream for writing data to a
40 * a file is available or may be created depends upon the underlying
41 * platform. Some platforms, in particular, allow a file to be opened
43 * file-writing object) at a time. In such situations the constructors in
44 * this class will fail if the file involved is already open.
54 * @see java.nio.file.Files#newOutputStream
61 * The system dependent file descripto
168 FileOutputStream(File file) argument
201 FileOutputStream(File file, boolean append) argument
[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
39 file = File.createTempFile(getClass().getName(), ".zip");
40 file.deleteOnExit();
43 ZipOutputStream out = new ZipOutputStream(new FileOutputStream(file));
58 ZipFile zipFile = new ZipFile(file);
71 ZipFile zipFile = new ZipFile(file);
H A DZipFileBenchmark.java5 * you may not use this file except in compliance with the License.
33 private File file; field in class:ZipFileBenchmark
39 file = File.createTempFile(getClass().getName(), ".zip");
40 file.deleteOnExit();
41 writeEntries(new ZipOutputStream(new FileOutputStream(file)), numEntries, 0);
42 ZipFile zipFile = new ZipFile(file);
51 ZipFile zf = new ZipFile(file);
/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/harmony-tests/src/test/java/org/apache/harmony/tests/internal/net/www/protocol/file/
H A DFileURLConnectionTest.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
17 package org.apache.harmony.tests.internal.net.www.protocol.file;
47 File file = File.createTempFile("FileURLConnectionTest",
49 os = new BufferedOutputStream(new FileOutputStream(file));
52 return new URL("file://" + file.getAbsolutePath());
78 new FileURLConnection(new URL("file:///")).getContentType());
95 String localURLString = "file
[all...]
/libcore/ojluni/src/main/java/sun/net/www/protocol/file/
H A DHandler.java8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
14 * version 2 for more details (a copy is included in the LICENSE file that
26 package sun.net.www.protocol.file;
40 * Open an file input stream given a URL.
55 * Ugly backwards compatibility. Flip any file separator
57 * and "fixes" win32 file paths. According to RFC 2396,
60 * performed this "fixup" behavior in the file URL parsing code
80 File file = new File(ParseUtil.decode(u.getPath()));
81 return createFileURLConnection(u, file);
110 createFileURLConnection(URL u, File file) argument
[all...]
H A DFileURLConnection.java8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
14 * version 2 for more details (a copy is included in the LICENSE file that
27 * Open an file input stream given a URL.
32 package sun.net.www.protocol.file;
58 File file; field in class:FileURLConnection
67 protected FileURLConnection(URL u, File file) { argument
69 this.file = file;
81 filename = file
[all...]
/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...]
/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/test/java/libcore/java/io/
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/ojluni/src/main/java/sun/net/www/http/
H A DHttpCapture.java8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
14 * version 2 for more details (a copy is included in the LICENSE file that
37 * If set, it should point to a file containing the capture rules.
38 * Format for the file is simple:
41 * - a rule is a pair of a regular expression and file pattern, separated by a comma
43 * that URL will be captured in the associated file.
44 * - if the file name contains a '%d', then that sequence will be replaced by a
47 * - Rules are checked in sequence, in the same order as in the file, until a
57 private File file field in class:HttpCapture
[all...]
/libcore/ojluni/src/main/java/sun/security/ssl/
H A DTrustManagerFactoryImpl.java8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
14 * version 2 for more details (a copy is included in the LICENSE file that
106 * Try to get an InputStream based on the file we pass in.
108 private static FileInputStream getFileInputStream(final File file) argument
114 if (file.exists()) {
115 return new FileInputStream(file);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DOutputStreamTesterTest.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
78 private File file; field in class:OutputStreamTesterTest.FileOutputStreamSinkTester
85 file = File.createTempFile("FileOutputStreamSinkTester", "tmp");
86 file.deleteOnExit();
87 return new FileOutputStream(file, append);
91 return Streams.streamToBytes(new FileInputStream(file));
H A DWriterTesterTest.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 private File file; field in class:WriterTesterTest.FileWriterCharSinkTester
81 file = File.createTempFile("FileOutputStreamSinkTester", "tmp");
82 file.deleteOnExit();
83 return new FileWriter(file, append);
88 return Streams.streamToString(new FileReader(file)).toCharArray();
/libcore/luni/src/test/java/libcore/java/lang/
H A DOldRuntimeTest.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
279 void checkExec(int testCase, String [] envp, File file) { argument
298 proc = Runtime.getRuntime().exec(command, envp, file);
307 proc = Runtime.getRuntime().exec(commandArguments, envp, file);
447 if (!"file open failed".equals(ex.getMessage())) {
/libcore/tzdata/tools/src/main/libcore/tzdata/update/tools/
H A DTzDataBundleBuilder.java5 * you may not use this file except in compliance with the License.
68 throw new IllegalStateException("Missing zoneInfo file");
122 public static byte[] readFileAsByteArray(File file) throws IOException { argument
125 try (FileInputStream fis = new FileInputStream(file)) {
/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...]
/libcore/tzdata/update/src/test/libcore/tzdata/update/
H A DTzDataBundleInstallerTest.java5 * you may not use this file except in compliance with the License.
84 /** Tests that a bundle with a missing file will not update the content. */
110 * Tests that a bundle with a checksum entry that references a missing file will not update the
150 // The file to include in the installation-time checksum check.
203 private static void createFile(File file) { argument
204 try (FileOutputStream fos = new FileOutputStream(file)) {
/libcore/dom/src/test/java/org/w3c/domts/
H A DDOMTestInnerClass.java134 String host, String file, String name,
137 test.assertURIEquals(assertID, scheme, path, host, file, name, query,
133 assertURIEquals(String assertID, String scheme, String path, String host, String file, String name, String query, String fragment, Boolean isAbsolute, String actual) argument
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DControlTest.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
414 * change the value in the .properties file
417 static void changeProperties(File file) throws FileNotFoundException { argument
419 PrintWriter writer = new PrintWriter(file);
423 Scanner scanner = new Scanner(file);
482 // change the file
512 .println("Can not find the test file, some code of this test 'test_needsReload_LStringLLocaleLStringLClassLoaderResourceBundleJ' did not run.");
/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...]

Completed in 1277 milliseconds

123