/dalvik/dx/src/com/android/dx/util/ |
D | FileUtils.java | 42 File file = new File(fileName); in readFile() local 43 return readFile(file); in readFile() 53 public static byte[] readFile(File file) { in readFile() argument 54 if (!file.exists()) { in readFile() 55 throw new RuntimeException(file + ": file not found"); in readFile() 58 if (!file.isFile()) { in readFile() 59 throw new RuntimeException(file + ": not a file"); in readFile() 62 if (!file.canRead()) { in readFile() 63 throw new RuntimeException(file + ": file not readable"); in readFile() 66 long longLength = file.length(); in readFile() [all …]
|
/dalvik/libcore/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/ |
D | Handler.java | 61 String file = url.getFile(); in parseURL() local 62 if (file == null) { in parseURL() 63 file = ""; //$NON-NLS-1$ in parseURL() 70 if (spec.indexOf("!/") == -1 && (file.indexOf("!/") == -1)) { //$NON-NLS-1$ //$NON-NLS-2$ in parseURL() 73 if (file.equals("")) { in parseURL() 74 file = spec; in parseURL() 76 file = file.substring(0, file.indexOf('!') + 1) + spec; in parseURL() 78 int idx = file.indexOf('!'); in parseURL() 79 String tmpFile = file.substring(idx + 1, file.lastIndexOf('/') + 1) in parseURL() 82 file = file.substring(0, idx + 1) + tmpFile; in parseURL() [all …]
|
/dalvik/dx/src/com/android/dx/dex/file/ |
D | HeaderItem.java | 17 package com.android.dx.dex.file; 60 public void addContents(DexFile file) { in addContents() argument 66 public void writeTo(DexFile file, AnnotatedOutput out) { in writeTo() argument 67 int mapOff = file.getMap().getFileOffset(); in writeTo() 68 Section firstDataSection = file.getFirstDataSection(); in writeTo() 69 Section lastDataSection = file.getLastDataSection(); in writeTo() 79 Hex.u4(file.getFileSize())); in writeTo() 95 out.writeInt(file.getFileSize()); in writeTo() 108 file.getStringIds().writeHeaderPart(out); in writeTo() 109 file.getTypeIds().writeHeaderPart(out); in writeTo() [all …]
|
D | FieldIdItem.java | 17 package com.android.dx.dex.file; 42 public void addContents(DexFile file) { in addContents() argument 43 super.addContents(file); in addContents() 45 TypeIdsSection typeIds = file.getTypeIds(); in addContents() 60 protected int getTypoidIdx(DexFile file) { in getTypoidIdx() argument 61 TypeIdsSection typeIds = file.getTypeIds(); in getTypoidIdx()
|
D | MethodIdItem.java | 17 package com.android.dx.dex.file; 42 public void addContents(DexFile file) { in addContents() argument 43 super.addContents(file); in addContents() 45 ProtoIdsSection protoIds = file.getProtoIds(); in addContents() 60 protected int getTypoidIdx(DexFile file) { in getTypoidIdx() argument 61 ProtoIdsSection protoIds = file.getProtoIds(); in getTypoidIdx()
|
D | MemberIdItem.java | 17 package com.android.dx.dex.file; 54 public void addContents(DexFile file) { in addContents() argument 55 super.addContents(file); in addContents() 57 StringIdsSection stringIds = file.getStringIds(); in addContents() 63 public final void writeTo(DexFile file, AnnotatedOutput out) { in writeTo() argument 64 TypeIdsSection typeIds = file.getTypeIds(); in writeTo() 65 StringIdsSection stringIds = file.getStringIds(); in writeTo() 69 int typoidIdx = getTypoidIdx(file); in writeTo() 92 protected abstract int getTypoidIdx(DexFile file); in getTypoidIdx() argument
|
D | UniformItemSection.java | 17 package com.android.dx.dex.file; 39 public UniformItemSection(String name, DexFile file, int alignment) { in UniformItemSection() argument 40 super(name, file, alignment); in UniformItemSection() 71 DexFile file = getFile(); in prepare0() local 76 one.addContents(file); in prepare0() 83 DexFile file = getFile(); in writeTo0() local 87 one.writeTo(file, out); in writeTo0()
|
D | DebugInfoItem.java | 17 package com.android.dx.dex.file; 66 public void addContents(DexFile file) { in addContents() argument 100 public void annotateTo(DexFile file, AnnotatedOutput out, String prefix) { in annotateTo() argument 101 encode(file, prefix, null, out, false); in annotateTo() 116 protected void writeTo0(DexFile file, AnnotatedOutput out) { in writeTo0() argument 124 encode(file, null, null, out, true); in writeTo0() 142 private byte[] encode(DexFile file, String prefix, PrintWriter debugPrint, in encode() argument 144 byte[] result = encode0(file, prefix, debugPrint, out, consume); in encode() 146 if (ENABLE_ENCODER_SELF_CHECK && (file != null)) { in encode() 148 DebugInfoDecoder.validateEncode(result, file, ref, code, in encode() [all …]
|
D | ClassDataItem.java | 17 package com.android.dx.dex.file; 229 public void addContents(DexFile file) { in addContents() argument 233 field.addContents(file); in addContents() 240 field.addContents(file); in addContents() 247 method.addContents(file); in addContents() 254 method.addContents(file); in addContents() 343 private void encodeOutput(DexFile file, AnnotatedOutput out) { in encodeOutput() argument 351 encodeSize(file, out, "static_fields", staticFields.size()); in encodeOutput() 352 encodeSize(file, out, "instance_fields", instanceFields.size()); in encodeOutput() 353 encodeSize(file, out, "direct_methods", directMethods.size()); in encodeOutput() [all …]
|
D | Section.java | 17 package com.android.dx.dex.file; 32 private final DexFile file; field in Section 69 public Section(String name, DexFile file, int alignment) { in Section() argument 70 if (file == null) { in Section() 77 this.file = file; in Section() 89 return file; in getFile()
|
D | ValueEncoder.java | 17 package com.android.dx.dex.file; 99 private final DexFile file; field in ValueEncoder 110 public ValueEncoder(DexFile file, AnnotatedOutput out) { in ValueEncoder() argument 111 if (file == null) { in ValueEncoder() 119 this.file = file; in ValueEncoder() 158 int index = file.getStringIds().indexOf((CstString) cst); in writeConstant() 163 int index = file.getTypeIds().indexOf((CstType) cst); in writeConstant() 168 int index = file.getFieldIds().indexOf((CstFieldRef) cst); in writeConstant() 173 int index = file.getMethodIds().indexOf((CstMethodRef) cst); in writeConstant() 179 int index = file.getFieldIds().indexOf(fieldRef); in writeConstant() [all …]
|
D | TypeIdItem.java | 17 package com.android.dx.dex.file; 54 public void addContents(DexFile file) { in addContents() argument 55 file.getStringIds().intern(getDefiningClass().getDescriptor()); in addContents() 60 public void writeTo(DexFile file, AnnotatedOutput out) { in writeTo() argument 63 int idx = file.getStringIds().indexOf(descriptor); in writeTo()
|
/dalvik/libcore/luni/src/main/java/java/net/ |
D | URLStreamHandler.java | 111 String file = u.getPath(); in parseURL() local 129 file = ""; //$NON-NLS-1$ in parseURL() 185 if (queryIdx == 0 && file != null) { in parseURL() 186 if (file.equals("")) { //$NON-NLS-1$ in parseURL() 187 file = "/"; //$NON-NLS-1$ in parseURL() 188 } else if (file.startsWith("/")) { //$NON-NLS-1$ in parseURL() 191 int last = file.lastIndexOf('/') + 1; in parseURL() 192 file = file.substring(0, last); in parseURL() 203 file = parseString.substring(fileIdx, fileEnd); in parseURL() 205 if (file == null) { in parseURL() [all …]
|
D | URL.java | 52 private String file; field in URL 332 public URL(String protocol, String host, String file) in URL() argument 334 this(protocol, host, -1, file, (URLStreamHandler) null); in URL() 354 public URL(String protocol, String host, int port, String file) in URL() argument 356 this(protocol, host, port, file, (URLStreamHandler) null); in URL() 382 public URL(String protocol, String host, int port, String file, in URL() argument 403 index = file.indexOf("#", file.lastIndexOf("/")); //$NON-NLS-1$ //$NON-NLS-2$ in URL() 405 this.file = file.substring(0, index); in URL() 406 ref = file.substring(index + 1); in URL() 408 this.file = file; in URL() [all …]
|
/dalvik/libcore/tools/integrate/ |
D | Filesystem.java | 36 for (String file : files) { in moveContents() 37 String targetFile = target + "/" + file.substring(source.length()); in moveContents() 39 new Command("mv", "-i", file, targetFile).execute(); in moveContents() 44 private String parent(String file) { in parent() argument 45 return file.substring(0, file.lastIndexOf('/')); in parent() 60 public void rm(String file) { in rm() argument 61 new Command("rm", "-r", file).execute(); in rm()
|
/dalvik/libcore/luni/src/test/java/tests/api/java/io/ |
D | OpenRandomFileTest.java | 50 File file = File.createTempFile("test", "tmp"); in testOpenNonEmptyFile() local 51 assertTrue(file.exists()); in testOpenNonEmptyFile() 52 file.deleteOnExit(); in testOpenNonEmptyFile() 53 FileOutputStream fos = new FileOutputStream(file); in testOpenNonEmptyFile() 57 String fileName = file.getCanonicalPath(); in testOpenNonEmptyFile() 72 File file = File.createTempFile("test", "tmp"); in testOpenEmptyFile() local 73 assertTrue(file.exists()); in testOpenEmptyFile() 74 file.deleteOnExit(); in testOpenEmptyFile() 76 String fileName = file.getCanonicalPath(); in testOpenEmptyFile()
|
/dalvik/libcore/security/src/test/java/tests/security/permissions/ |
D | JavaIoRandomAccessFileTest.java | 69 String file; in test_RandomAccessFile1() field in JavaIoRandomAccessFileTest.TestSecurityManager 72 file = null; in test_RandomAccessFile1() 75 public void checkRead(String file){ in test_RandomAccessFile1() argument 77 this.file = file; in test_RandomAccessFile1() 78 super.checkRead(file); in test_RandomAccessFile1() 98 assertEquals("Argument of checkRead is not correct", filename, s.file); in test_RandomAccessFile1() 103 assertEquals("Argument of checkRead is not correct", filename, s.file); in test_RandomAccessFile1() 127 public void checkRead(String file) { in test_RandomAccessFile2() argument 129 this.checkReadFile = file; in test_RandomAccessFile2() 130 super.checkRead(file); in test_RandomAccessFile2() [all …]
|
D | JavaIoFileTest.java | 78 public void checkDelete(String file) { in test_File1() argument 80 this.filename = file; in test_File1() 185 String file; in test_File2() field in JavaIoFileTest.TestSecurityManager 188 file = null; in test_File2() 191 public void checkRead(String file){ in test_File2() argument 193 this.file = file; in test_File2() 213 assertEquals("Argument of checkRead is not correct", filename, s.file); in test_File2() 218 assertEquals("Argument of checkRead is not correct", filename, s.file); in test_File2() 223 assertEquals("Argument of checkRead is not correct", filename, s.file); in test_File2() 228 assertEquals("Argument of checkRead is not correct", filename, s.file); in test_File2() [all …]
|
D | JavaIoFileOutputStreamTest.java | 88 String file; in test_FileOutputStream1() field in JavaIoFileOutputStreamTest.TestSecurityManager 92 file = null; in test_FileOutputStream1() 102 public void checkWrite(String file){ in test_FileOutputStream1() argument 104 this.file = file; in test_FileOutputStream1() 105 super.checkWrite(file); in test_FileOutputStream1() 131 assertEquals("Argument of checkWrite is not correct", filename, s.file); in test_FileOutputStream1() 136 assertEquals("Argument of checkWrite is not correct", filename, s.file); in test_FileOutputStream1() 141 assertEquals("Argument of checkWrite is not correct", filename, s.file); in test_FileOutputStream1() 146 assertEquals("Argument of checkWrite is not correct", filename, s.file); in test_FileOutputStream1()
|
D | JavaIoFileInputStreamTest.java | 76 String file; in test_FileInputStream() field in JavaIoFileInputStreamTest.TestSecurityManager 80 file = null; in test_FileInputStream() 90 public void checkRead(String file){ in test_FileInputStream() argument 92 this.file = file; in test_FileInputStream() 93 super.checkRead(file); in test_FileInputStream() 119 assertEquals("Argument of checkRead is not correct", filename, s.file); in test_FileInputStream() 124 assertEquals("Argument of checkRead is not correct", filename, s.file); in test_FileInputStream()
|
/dalvik/tools/ |
D | dexcheck | 21 for file in $files; do 22 echo $file 23 errout=`adb shell "dexdump /data/dalvik-cache/$file > dev/null"` 26 echo " Failure in $file: $errout"
|
/dalvik/dx/src/com/android/dx/cf/direct/ |
D | ClassPathOpener.java | 81 void onProcessArchiveStart(File file); in onProcessArchiveStart() argument 106 File file = new File(pathname); in process() local 108 return processOne(file, true); in process() 119 private boolean processOne(File file, boolean topLevel) { in processOne() argument 121 if (file.isDirectory()) { in processOne() 122 return processDirectory(file, topLevel); in processOne() 125 String path = file.getPath(); in processOne() 130 return processArchive(file); in processOne() 133 byte[] bytes = FileUtils.readFile(file); in processOne() 204 private boolean processArchive(File file) throws IOException { in processArchive() argument [all …]
|
/dalvik/libcore-disabled/sound/src/main/java/com/android/internal/sound/midi/ |
D | AndroidMidiFileReader.java | 39 … public MidiFileFormat getMidiFileFormat(File file) throws InvalidMidiDataException, IOException { in getMidiFileFormat() argument 55 public Sequence getSequence(File file) throws InvalidMidiDataException, IOException { in getSequence() argument 56 return new AndroidSequence(file.toURL()); in getSequence() 61 File file = File.createTempFile("javax.sound.midi-", null); in getSequence() local 62 file.deleteOnExit(); in getSequence() 64 BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file)); in getSequence() 76 return getSequence(file); in getSequence()
|
/dalvik/libcore-disabled/sound/src/main/java/com/android/internal/sound/sampled/ |
D | AndroidAudioFileReader.java | 39 public AudioFileFormat getAudioFileFormat(File file) throws UnsupportedAudioFileException, in getAudioFileFormat() argument 57 public AudioInputStream getAudioInputStream(File file) throws UnsupportedAudioFileException, in getAudioInputStream() argument 59 return new AndroidAudioInputStream(file.toURL()); in getAudioInputStream() 65 File file = File.createTempFile("javax.sound.sampled-", null); in getAudioInputStream() local 66 file.deleteOnExit(); in getAudioInputStream() 68 BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file)); in getAudioInputStream() 80 return getAudioInputStream(file); in getAudioInputStream()
|
/dalvik/libcore/luni/src/main/java/java/io/ |
D | FileWriter.java | 41 public FileWriter(File file) throws IOException { in FileWriter() argument 42 super(new FileOutputStream(file)); in FileWriter() 57 public FileWriter(File file, boolean append) throws IOException { in FileWriter() argument 58 super(new FileOutputStream(file, append)); in FileWriter()
|