Home
last modified time | relevance | path

Searched refs:closer (Results 1 – 7 of 7) sorted by relevance

/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zfile/
DApkZFileCreator.java114 Closer closer = Closer.create(); in writeZip() local
116 ZFile toMerge = closer.register(new ZFile(zip)); in writeZip()
143 throw closer.rethrow(t); in writeZip()
145 closer.close(); in writeZip()
155 Closer closer = Closer.create(); in writeFile() local
157 FileInputStream inputFileStream = closer.register(new FileInputStream(inputFile)); in writeFile()
160 throw closer.rethrow(e, IOException.class); in writeFile()
162 throw closer.rethrow(t); in writeFile()
164 closer.close(); in writeFile()
/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/sign/
DManifestGenerationTest.java82 try (Closer closer = Closer.create()) { in manifestGenerationOnHalfWrittenFile() argument
83 ZFile zf = closer.register(new ZFile(zip)); in manifestGenerationOnHalfWrittenFile()
118 try (Closer closer = Closer.create()) { in manifestGenerationOnExistingFile() argument
119 ZFile zf = closer.register(new ZFile(zip)); in manifestGenerationOnExistingFile()
156 try (Closer closer = Closer.create()) { in manifestGenerationOnIncrementalNoChanges() argument
157 ZFile zf = closer.register(new ZFile(zip)); in manifestGenerationOnIncrementalNoChanges()
173 zf = closer.register(new ZFile(zip)); in manifestGenerationOnIncrementalNoChanges()
/tools/metalava/src/main/java/com/android/tools/metalava/
DRewriteAnnotations.kt211 Closer.create().use { closer -> in <lambda>() method
212 val fos = closer.register(FileOutputStream(to)) in <lambda>()
213 val bos = closer.register(BufferedOutputStream(fos)) in <lambda>()
214 val zos = closer.register(ZipOutputStream(bos)) in <lambda>()
216 val fis = closer.register(FileInputStream(from)) in <lambda>()
217 val bis = closer.register(BufferedInputStream(fis)) in <lambda>()
218 val zis = closer.register(ZipInputStream(bis)) in <lambda>()
/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/zip/
DZipMergeTest.java103 try (Closer closer = Closer.create()) { in mergeZipWithDeferredCrc() argument
104 ZFile fooZf = closer.register(new ZFile(foo)); in mergeZipWithDeferredCrc()
111 ZFile merged = closer.register(new ZFile(new File(mTemporaryFolder.getRoot(), "bar"))); in mergeZipWithDeferredCrc()
141 try (Closer closer = Closer.create()) { in mergeZipKeepsDeflatedAndStored() argument
142 ZFile fooZf = closer.register(new ZFile(foo)); in mergeZipKeepsDeflatedAndStored()
152 ZFile merged = closer.register(new ZFile(new File(mTemporaryFolder.getRoot(), "bar"))); in mergeZipKeepsDeflatedAndStored()
DZFileTest.java1112 try (Closer closer = Closer.create()) { in zipFileWithEocdMarkerInComment() argument
1113 ZipOutputStream zos = closer.register( in zipFileWithEocdMarkerInComment()
1120 ZFile zf = closer.register(new ZFile(zipFile)); in zipFileWithEocdMarkerInComment()
1134 try (Closer closer = Closer.create()) { in zipFileWithEocdMarkerInFileName() argument
1135 ZipOutputStream zos = closer.register( in zipFileWithEocdMarkerInFileName()
1141 ZFile zf = closer.register(new ZFile(zipFile)); in zipFileWithEocdMarkerInFileName()
1154 try (Closer closer = Closer.create()) { in zipFileWithEocdMarkerInFileContents() argument
1155 ZipOutputStream zos = closer.register( in zipFileWithEocdMarkerInFileContents()
1166 ZFile zf = closer.register(new ZFile(zipFile)); in zipFileWithEocdMarkerInFileContents()
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/
DProcessedAndRawByteSources.java81 Closer closer = Closer.create(); in close() local
82 closer.register(processedSource); in close()
83 closer.register(rawSource); in close()
84 closer.close(); in close()
DZFile.java2468 try (Closer closer = Closer.create()) { in addAllRecursively() argument
2469 FileInputStream fileInput = closer.register(new FileInputStream(file)); in addAllRecursively()
2480 try (Closer closer = Closer.create()) { in addAllRecursively() argument
2483 stream = closer.register(new ByteArrayInputStream(new byte[0])); in addAllRecursively()
2486 stream = closer.register(new FileInputStream(f)); in addAllRecursively()