/libcore/luni/src/main/java/java/io/ |
H A D | FileReader.java | 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 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 D | FileWriter.java | 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 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 D | FileInputStream.java | 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 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...] |
H A D | FileOutputStream.java | 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 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 D | PrintStream.java | 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 126 * Constructs a new {@code PrintStream} with {@code file} as its target. The 129 * @param file 130 * the target file. If the file already exists, its contents are 131 * removed, otherwise a new file is created. 133 * if an error occurs while opening or creating the target file. 135 public PrintStream(File file) throw argument 155 PrintStream(File file, String charsetName) argument [all...] |
H A D | PrintWriter.java | 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 115 * Constructs a new {@code PrintWriter} with {@code file} as its target. The 118 * file when a newline is encountered. The output to the file is buffered. 120 * @param file 121 * the target file. If the file already exists, its contents are 122 * removed, otherwise a new file i 126 PrintWriter(File file) argument 148 PrintWriter(File file, String csn) argument [all...] |
H A D | RandomAccessFile.java | 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 35 * Allows reading from and writing to a file in a random-access manner. This is 37 * {@link FileInputStream} or {@link FileOutputStream} provides. If the file is 50 // The unique file channel associated with this FileInputStream (lazily 61 * Constructs a new {@code RandomAccessFile} based on {@code file} and opens 68 * <td>The file is opened in read-only mode. An {@code IOException} is 73 * <td>The file is opened for reading and writing. If the file doe 101 RandomAccessFile(File file, String mode) argument [all...] |
/libcore/luni/src/main/java/java/net/ |
H A D | JarURLConnection.java | 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 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...] |
H A D | URLStreamHandler.java | 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 221 * @param file 222 * the file component. 230 String file, String ref) { 234 u.set(protocol, host, port, file, ref); 302 * port, file, and reference. 352 * port and file. 229 setURL(URL u, String protocol, String host, int port, String file, String ref) argument
|
H A D | URL.java | 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 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...] |
/libcore/luni/src/test/java/libcore/java/io/ |
H A D | RandomAccessFileTest.java | 5 * 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/test/java/libcore/java/util/zip/ |
H A D | OldAndroidZipStressTest.java | 5 * 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 D | HprofBinaryToAscii.java | 5 * 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/lang/ |
H A D | StackTraceElement.java | 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 51 * @param file 52 * The name of the file where execution is at or {@code null}. 54 * the line of the file where execution is at, a negative number 60 public StackTraceElement(String cls, String method, String file, int line) { argument 68 fileName = file; 88 * <li>the class, method and file names as well as the line number of this 147 * Returns the name of the Java source file containin [all...] |
H A D | SecurityManager.java | 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 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/support/src/test/java/tests/support/resource/ |
H A D | Support_Resources.java | 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 38 // If we have the resources packaged up in our jar file, get them that way. 75 url = new URL("file:/" + resPath + "/" + fileName); 98 public static File copyFile(File root, String folder, String file) { argument 110 File dest = new File(f.toString() + "/" + file); 112 InputStream in = Support_Resources.getStream(folder == null ? file 113 : folder + "/" + file); 167 * @param name - name of resource file [all...] |
/libcore/dalvik/src/main/java/dalvik/system/ |
H A D | DexFile.java | 5 * you may not use this file except in compliance with the License. 31 * Note we don't directly open and read the DEX file here. They're memory-mapped 40 * Opens a DEX file from a given File object. This will usually be a ZIP/JAR 41 * file with a "classes.dex" inside. 43 * The VM will generate the name of the corresponding file in 46 * a file in /data/dalvik-cache, as the named file is expected to be 49 * @param file 50 * the File object referencing the actual DEX file 53 * if an I/O error occurs, such as the file no 56 DexFile(File file) argument [all...] |
H A D | DexPathList.java | 5 * 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/dom/src/test/java/org/w3c/domts/ |
H A D | DOMTestInnerClass.java | 134 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
|
H A D | DOMTestCase.java | 647 * Expected scheme, for example, "file". If null, scheme is 655 * @param file 656 * Expected file, for example, "staff.xml". If null, file is 675 String file, 740 if (file != null || name != null) { 745 if (file != null) { 746 assertEquals(assertID, file, actualFile); 761 // Jar URL's will have any actual path like file:/c:/somedrive... 765 actualPath.startsWith("/") || actualPath.startsWith("file 670 assertURIEquals( String assertID, String scheme, String path, String host, String file, String name, String query, String fragment, Boolean isAbsolute, String actual) argument [all...] |
/libcore/luni/src/main/java/libcore/net/url/ |
H A D | JarURLConnectionImpl.java | 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 46 * file which can be anywhere that can be referred to by an URL. 83 findJarFile(); // ensure the file can be found 90 * Returns the Jar file referred by this {@code URLConnection}. 92 * @return the JAR file referenced by this connection 105 * Returns the Jar file referred by this {@code URLConnection} 138 if (jarFileURL.getProtocol().equals("file")) { 231 * Returns the content type of the resource. For jar file itsel 372 JarURLConnectionInputStream(InputStream in, JarFile file) argument [all...] |
/libcore/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ |
H A D | FileClientSessionCache.java | 5 * 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...] |
/libcore/luni/src/test/java/libcore/java/lang/ |
H A D | OldRuntimeTest.java | 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 301 void checkExec(int testCase, String [] envp, File file) { argument 320 proc = Runtime.getRuntime().exec(command, envp, file); 329 proc = Runtime.getRuntime().exec(commandArguments, envp, file); 473 if (!"file open failed".equals(ex.getMessage())) {
|
/libcore/luni/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ |
H A D | ZipFileTest.java | 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 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/luni/src/test/java/tests/org/w3c/dom/ |
H A D | DOMTestCase.java | 64 // build a URL for a test file in the JAR 103 String host, String file, String name, String query, 164 if (file != null || name != null) { 169 if (file != null) { 170 assertEquals(assertID, file, actualFile); 185 // Jar URL's will have any actual path like file:/c:/somedrive... 188 || actualPath.startsWith("file:/")); 102 assertURIEquals(String assertID, String scheme, String path, String host, String file, String name, String query, String fragment, Boolean isAbsolute, String actual) argument
|