/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ |
WriteNumberFormatSerialTestData.java | 47 FileOutputStream file = new FileOutputStream("NumberFormatSerialTestData.java"); local 48 file.write(header.getBytes()); 49 write(file,(Object)nf,"generalInstance", "//NumberFormat.getInstance(Locale.US)"); 50 write(file,(Object)nfc,"currencyInstance","//NumberFormat.getCurrencyInstance(Locale.US)"); 51 write(file,(Object)nfp,"percentInstance","//NumberFormat.getPercentInstance(Locale.US)"); 52 write(file,(Object)nfsp,"scientificInstance","//NumberFormat.getScientificInstance(Locale.US)"); 53 file.write(footer.getBytes()); 54 file.close(); 60 private static void write(FileOutputStream file,Object o ,String name,String comment){ 75 //file.write(myArr) [all...] |
/external/snakeyaml/src/test/java/org/pyyaml/ |
PyImportTest.java | 5 * you may not use this file except in compliance with the License. 18 import java.io.File; 66 content = Util.getLocalResource(PATH + File.separator + theName); 70 protected File[] getStreamsByExtension(String extention) { 74 protected File[] getStreamsByExtension(String extention, boolean onlyIfCanonicalPresent) { 75 File file = new File("src/test/resources/pyyaml"); local 76 assertTrue("Folder not found: " + file.getAbsolutePath(), file.exists()) 82 File file = new File("src\/test\/resources\/pyyaml\/" + name); local [all...] |
/packages/apps/Contacts/src/com/android/contacts/vcard/ |
ShareVCardActivity.java | 5 * you may not use this file except in compliance with the License. 27 import java.io.File; 34 * This activity connects to VCardService, creates a .vcf file in cache directory and send export 35 * request with the file URI so as to write contacts data to the file in background. 44 if (DEBUG) Log.d(LOG_TAG, "connected to service, requesting a destination file name"); 50 final File file = getLocalFile(); local 52 file.createNewFile(); 54 FeedbackHelper.sendFeedback(this, LOG_TAG, "Failed to create .vcf file", e) [all...] |
/packages/apps/Dialer/java/com/android/voicemail/impl/mail/internet/ |
BinaryTempFileBody.java | 5 * you may not use this file except in compliance with the License. 23 import java.io.File; 33 * A Body that is backed by a temp file. The Body exposes a getOutputStream method that allows the 34 * user to write to the temp file. After the write the body is available via getInputStream and 36 * closed the file is deleted and the Body should be considered disposed of. 39 private File file; field in class:BinaryTempFileBody 43 * file. Note that this file will be deleted after it is read. 45 * @param filePath The file containing the data to be stored on disk temporaril [all...] |
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ |
ByodIconSamplerActivity.java | 5 * you may not use this file except in compliance with the License. 66 FileOutputStream file = null; local 68 file = new FileOutputStream(fileName); 69 bitmap.compress(Bitmap.CompressFormat.PNG, 100, file); 74 if (file != null) { 75 file.close(); 76 Log.d(TAG, "Wrote badged icon to file: " + fileName);
|
/cts/hostsidetests/security/src/android/security/cts/ |
KernelConfigTest.java | 5 * you may not use this file except in compliance with the License. 29 import java.io.File; 79 * by avoiding pulling/parsing the config file for each individual test 93 File file = File.createTempFile("config.gz", ".tmp"); local 94 file.deleteOnExit(); 95 device.pullFile("/proc/config.gz", file); 97 BufferedReader reader = new BufferedReader(new InputStreamReader(new GZIPInputStream(new FileInputStream(file))));
|
/cts/tests/tests/content/src/android/content/res/cts/ |
AssetFileDescriptor_AutoCloseOutputStreamTest.java | 5 * you may not use this file except in compliance with the License. 18 import java.io.File; 52 * 1. Write file data into test file. 55 File file = new File(getContext().getFilesDir(), FILE_NAME); local 56 file.createNewFile(); 57 ParcelFileDescriptor fd = ParcelFileDescriptor.open(file, 69 fd = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_WRITE) [all...] |
/cts/tests/tests/security/src/android/security/cts/ |
BitmapFactorySecurityTests.java | 5 * you may not use this file except in compliance with the License. 24 import java.io.File; 39 File file = File.createTempFile("BitmapFactorySecurityFile" + resId, "img"); local 40 file.deleteOnExit(); 41 FileOutputStream output = new FileOutputStream(file); 49 ParcelFileDescriptor pfd = ParcelFileDescriptor.open(file,
|
/dalvik/dexgen/src/com/android/dexgen/dex/file/ |
HeaderItem.java | 5 * you may not use this file except in compliance with the License. 17 package com.android.dexgen.dex.file; 24 * File header section of a {@code .dex} file. 28 * {@code non-null;} the file format magic number, represented as the 60 public void addContents(DexFile file) { 66 public void writeTo(DexFile file, AnnotatedOutput out) { 67 int mapOff = file.getMap().getFileOffset(); 68 Section firstDataSection = file.getFirstDataSection(); 69 Section lastDataSection = file.getLastDataSection() [all...] |
UniformItemSection.java | 5 * you may not use this file except in compliance with the License. 17 package com.android.dexgen.dex.file; 25 * A section of a {@code .dex} file which consists of a sequence of 31 * Constructs an instance. The file offset is initially unknown. 35 * @param file {@code non-null;} file that this instance is part of 39 public UniformItemSection(String name, DexFile file, int alignment) { 40 super(name, file, alignment); 71 DexFile file = getFile(); local 76 one.addContents(file); 83 DexFile file = getFile(); local [all...] |
/dalvik/dx/src/com/android/dx/dex/file/ |
UniformItemSection.java | 5 * you may not use this file except in compliance with the License. 17 package com.android.dx.dex.file; 24 * A section of a {@code .dex} file which consists of a sequence of 30 * Constructs an instance. The file offset is initially unknown. 34 * @param file {@code non-null;} file that this instance is part of 38 public UniformItemSection(String name, DexFile file, int alignment) { 39 super(name, file, alignment); 70 DexFile file = getFile(); local 75 one.addContents(file); 82 DexFile file = getFile(); local [all...] |
/external/hamcrest/hamcrest-library/src/test/java/org/hamcrest/io/ |
FileMatchersTest.java | 6 import java.io.File; 13 private File directory; 14 private File file; field in class:FileMatchersTest 18 directory = File.createTempFile("myDir", ""); 22 file = new File(directory, "myFile"); 23 file.createNewFile(); 28 assertDoesNotMatch("doesn't match existing file", FileMatchers.anExistingDirectory(), file); [all...] |
/external/jacoco/org.jacoco.ant/src/org/jacoco/ant/ |
InstrumentTask.java | 16 import java.io.File; 36 private File destdir; 48 public void setDestdir(final File destdir) { 63 * This task accepts any number of class file resources. 96 final File file = new File(destdir, resource.getName()); local 97 file.getParentFile().mkdirs(); 103 output = new FileOutputStream(file); 111 file.delete() [all...] |
/external/jacoco/org.jacoco.cli.test/src/org/jacoco/cli/internal/ |
XmlDocumentationTest.java | 17 import java.io.File; 75 File file = new File(tmp.getRoot(), "doc.xml"); local 77 XmlDocumentation.main(file.getAbsolutePath()); 79 Document doc = parse(file); 110 private Document parse(File file) throws Exception { 111 InputStream in = new FileInputStream(file);
|
/external/smali/smalidea/src/test/java/org/jf/smalidea/ |
SmaliClassModifierListTest.java | 46 SmaliFile file = (SmaliFile)myFixture.addFileToProject("my/pkg/blah.smali", local 50 SmaliClass smaliClass = file.getPsiClass(); 80 SmaliFile file = (SmaliFile)myFixture.addFileToProject("my/pkg/blah.smali", local 84 SmaliClass smaliClass = file.getPsiClass(); 107 final SmaliFile file = (SmaliFile)myFixture.addFileToProject("my/pkg/blah.smali", local 110 myFixture.configureFromExistingVirtualFile(file.getVirtualFile()); 114 file.getPsiClass().getModifierList().setModifierProperty("final", true); 124 final SmaliFile file = (SmaliFile)myFixture.addFileToProject("my/pkg/blah.smali", local 127 myFixture.configureFromExistingVirtualFile(file.getVirtualFile()); 131 file.getPsiClass().getModifierList().setModifierProperty("final", false) 141 final SmaliFile file = (SmaliFile)myFixture.addFileToProject("my\/pkg\/blah.smali", local 160 final SmaliFile file = (SmaliFile)myFixture.addFileToProject("my\/pkg\/blah.smali", local 177 final SmaliFile file = (SmaliFile)myFixture.addFileToProject("my\/pkg\/blah.smali", local [all...] |
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/issues/issue46/ |
FileTest.java | 5 * you may not use this file except in compliance with the License. 18 import java.io.File; 31 * Issue 46: Dump a java.io.File object 36 File file = new File("src/test/resources/examples/list-bean-1.yaml"); local 37 assertTrue(file.exists()); 39 Map<String, File> map = new HashMap<String, File>(); 40 map.put("one", file); 57 File file = (File) data; local [all...] |
/frameworks/base/core/java/android/gesture/ |
GestureLibraries.java | 5 * you may not use this file except in compliance with the License. 24 import java.io.File; 37 return fromFile(new File(path)); 40 public static GestureLibrary fromFile(File path) { 53 private final File mPath; 55 public FileGestureLibrary(File path) { 67 final File file = mPath; 69 final File parentFile = file.getParentFile() 93 final File file = mPath; local [all...] |
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/model/ |
MutexFileProvider.java | 5 * you may not use this file except in compliance with the License. 21 import java.io.File; 25 * This class provides a shared file to several threads. Only one thread 26 * at a time can use the file. To acquire the file a thread has to 29 * when another one wants to acquire the file. In case a release is requested 30 * the thread owning the file must release it as soon as possible. If no 31 * callback is provided a thread that acquires the file must release it 33 * have the file for less time. 42 private final File mFile [all...] |
/frameworks/layoutlib/bridge/src/libcore/io/ |
MemoryMappedFile_Delegate.java | 5 * you may not use this file except in compliance with the License. 25 import java.io.File; 48 /** Path on the target device where the data file is available. */ 51 private static File sRootPath; 63 File f = new File(sRootPath, path); 65 throw new ErrnoException("File not found: " + f.getPath(), 1); 67 RandomAccessFile file = new RandomAccessFile(f, "r"); local 69 long size = file.length(); 70 MemoryMappedFile_Delegate newDelegate = new MemoryMappedFile_Delegate(file); [all...] |
/libcore/benchmarks/src/benchmarks/ |
BufferedZipFileBenchmark.java | 5 * you may not use this file except in compliance with the License. 22 import java.io.File; 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); [all...] |
ZipFileBenchmark.java | 5 * you may not use this file except in compliance with the License. 21 import java.io.File; 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); [all...] |
/libcore/luni/src/main/java/libcore/io/ |
NioBufferIterator.java | 5 * you may not use this file except in compliance with the License. 27 private final MemoryMappedFile file; field in class:NioBufferIterator 34 NioBufferIterator(MemoryMappedFile file, long address, int length, boolean swap) { 35 file.checkNotClosed(); 37 this.file = file; 68 file.checkNotClosed(); 75 file.checkNotClosed(); 83 file.checkNotClosed(); 92 file.checkNotClosed() [all...] |
/libcore/luni/src/test/java/libcore/xml/ |
DeclarationTest.java | 5 * you may not use this file except in compliance with the License. 25 import java.io.File; 61 File file = File.createTempFile("temp", "xml"); local 62 file.deleteOnExit(); 63 OutputStream out = new FileOutputStream(file); 66 return "file:" + file;
|
/libcore/ojluni/src/test/java/nio/file/attribute/ |
BasicFileAttributeViewCreationTimeTest.java | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 12 * version 2 for more details (a copy is included in the LICENSE file that 26 * @summary Basic test for creationTime attribute on platforms/file systems 31 // jdk/test/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java 33 package test.java.nio.file.attribute; 35 import test.java.nio.file.TestUtil; 37 import java.nio.file.Path; 38 import java.nio.file.Files; 39 import java.nio.file.attribute.*; 51 private static FileTime creationTime(Path file) throws IOException 65 Path file = Files.createFile(top.resolve("foo")); local [all...] |
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/archives/ |
TestUtils.java | 5 * you may not use this file except in compliance with the License. 26 import java.io.File; 49 * Creates an empty temporary file. 51 public File createTemporaryFile() throws IOException { 52 return File.createTempFile("com.android.documentsui.archives.tests{", 57 * Opens a resource and returns the contents via file descriptor to a local 58 * snapshot file. 61 // Extract the file from resources. 62 File file = null local [all...] |