Home
last modified time | relevance | path

Searched refs:jarFile (Results 1 – 16 of 16) sorted by relevance

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/jar/
DJarFileTest.java163 JarFile jarFile = new JarFile(new File("Wrong.file")); in test_ConstructorLjava_io_File() local
171 JarFile jarFile = new JarFile(new File(resources, jarName)); in test_ConstructorLjava_io_File() local
182 JarFile jarFile = new JarFile("Wrong.file"); in test_ConstructorLjava_lang_String() local
191 JarFile jarFile = new JarFile(fileName); in test_ConstructorLjava_lang_String() local
202 JarFile jarFile = new JarFile("Wrong.file", false); in test_ConstructorLjava_lang_StringZ() local
211 JarFile jarFile = new JarFile(fileName, true); in test_ConstructorLjava_lang_StringZ() local
222 JarFile jarFile = new JarFile(new File("Wrong.file"), true); in test_ConstructorLjava_io_FileZ() local
230 JarFile jarFile = new JarFile(new File(resources, jarName), false); in test_ConstructorLjava_io_FileZ() local
241 JarFile jarFile = new JarFile(new File("Wrong.file"), true, in test_ConstructorLjava_io_FileZI() local
250 JarFile jarFile = new JarFile(new File(resources, jarName), false, in test_ConstructorLjava_io_FileZI() local
[all …]
DJarEntryTest.java37 private JarFile jarFile; field in JarEntryTest
57 jarFile = new JarFile(new File(resources, jarName)); in setUp()
62 if (jarFile != null) { in tearDown()
63 jarFile.close(); in tearDown()
72 JarEntry newJarEntry = new JarEntry(jarFile.getJarEntry(entryName)); in test_ConstructorLjava_util_jar_JarEntry()
85 assertNotNull("Jar file is null", jarFile); in test_ConstructorLjava_util_zip_ZipEntry()
86 zipEntry = jarFile.getEntry(entryName); in test_ConstructorLjava_util_zip_ZipEntry()
119 zipEntry = jarFile.getEntry(entryName2); in testCertificatesAndCodesigners()
127 JarFile jarFile = new JarFile(file); in testCertificatesAndCodesigners() local
128 JarEntry jarEntry1 = jarFile.getJarEntry("Test.class"); in testCertificatesAndCodesigners()
[all …]
DManifestTest.java62 JarFile jarFile = new JarFile(new File(resources, fileName)); in getManifest() local
63 Manifest m = jarFile.getManifest(); in getManifest()
64 jarFile.close(); in getManifest()
/libcore/luni/src/test/java/libcore/io/
DClassPathURLStreamHandlerTest.java50 private File jarFile; field in ClassPathURLStreamHandlerTest
56 jarFile = new File(resources, JAR); in setUp()
66 String fileName = jarFile.getPath(); in testConstructor()
72 String fileName = jarFile.getPath(); in testGetEntryOrNull()
105 String fileName = jarFile.getPath(); in checkGetEntryUrlOrNull()
113 assertOpenConnectionOk(jarFile, expectedJarRelativeURI, streamHandler); in checkGetEntryUrlOrNull()
117 String fileName = jarFile.getPath(); in testIsEntryStored()
133 String fileName = jarFile.getPath(); in testOpenConnection()
136 assertOpenConnectionOk(jarFile, ENTRY_IN_ROOT, streamHandler); in testOpenConnection()
137 assertOpenConnectionOk(jarFile, ENTRY_IN_SUBDIR, streamHandler); in testOpenConnection()
[all …]
/libcore/luni/src/main/java/libcore/io/
DClassPathURLStreamHandler.java44 private final JarFile jarFile; field in ClassPathURLStreamHandler
47 jarFile = new JarFile(jarFileName); in ClassPathURLStreamHandler()
60 if (findEntryWithDirectoryFallback(jarFile, entryName) != null) { in getEntryUrlOrNull()
78 ZipEntry entry = jarFile.getEntry(entryName); in isEntryStored()
89 jarFile.close(); in close()
97 static ZipEntry findEntryWithDirectoryFallback(JarFile jarFile, String entryName) { in findEntryWithDirectoryFallback() argument
98 ZipEntry entry = jarFile.getEntry(entryName); in findEntryWithDirectoryFallback()
100 entry = jarFile.getEntry(entryName + "/"); in findEntryWithDirectoryFallback()
127 this.jarEntry = findEntryWithDirectoryFallback(ClassPathURLStreamHandler.this.jarFile, in connect()
132 + ", zipfile=" + jarFile.getName()); in connect()
[all …]
/libcore/luni/src/test/java/libcore/java/util/jar/
DOldJarEntryTest.java32 private JarFile jarFile; field in OldJarEntryTest
41 jarFile = new JarFile(new File(resources, jarName)); in setUp()
46 if (jarFile != null) { in tearDown()
47 jarFile.close(); in tearDown()
56 JarEntry newJarEntry = new JarEntry(jarFile.getJarEntry(entryName)); in test_ConstructorLjava_util_jar_JarEntry_on_null()
72 assertNotNull("Jar file is null", jarFile); in test_ConstructorLjava_util_zip_ZipEntry()
73 zipEntry = jarFile.getEntry(entryName); in test_ConstructorLjava_util_zip_ZipEntry()
102 assertNotNull("Jar file is null", jarFile); in test_ConstructorLjava_lang_String()
103 zipEntry = jarFile.getEntry(entryName); in test_ConstructorLjava_lang_String()
128 assertNotNull("Jar file is null", jarFile); in test_ConstructorLjava_util_jar_JarEntry()
[all …]
DOldJarFileTest.java110 JarFile jarFile = new JarFile(new File(resources, modifiedJarName), true); in test_close() local
111 jarFile.entries(); in test_close()
113 jarFile.close(); in test_close()
114 jarFile.close(); in test_close()
/libcore/ojluni/src/main/java/sun/net/www/protocol/jar/
DJarURLConnection.java74 private JarFile jarFile; field in JarURLConnection
90 return jarFile; in getJarFile()
111 jarFile.close(); in close()
122 jarFile = factory.get(getJarFileURL(), getUseCaches()); in connect()
128 jarFileURLConnection = factory.getConnection(jarFile); in connect()
132 jarEntry = (JarEntry)jarFile.getEntry(entryName); in connect()
136 jarFile.close(); in connect()
142 jarFile.getName()); in connect()
160 jarFile.getName()); in getInputStream()
162 result = new JarURLInputStream (jarFile.getInputStream(jarEntry)); in getInputStream()
[all …]
DJarFileFactory.java59 URLConnection getConnection(JarFile jarFile) throws IOException { in getConnection() argument
62 u = urlCache.get(jarFile); in getConnection()
112 public void close(JarFile jarFile) { in close() argument
114 URL urlRemoved = urlCache.remove(jarFile); in close()
152 private Permission getPermission(JarFile jarFile) { in getPermission() argument
154 URLConnection uc = getConnection(jarFile); in getPermission()
DURLJarFile.java196 JarFile jarFile = new URLJarFile(tmpFile.toURL(), closeController); in retrieve() local
197 return jarFile; in retrieve()
261 public void close(JarFile jarFile); in close() argument
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DJarURLConnectionTest.java41 private URL copyAndOpenResourceStream(String jarFile, String inFile) in copyAndOpenResourceStream() argument
46 Support_Resources.copyFile(resources, "net", jarFile); in copyAndOpenResourceStream()
47 File file = new File(resources.toString() + "/net/" + jarFile); in copyAndOpenResourceStream()
143 File jarFile = File.createTempFile("1+2 3", "test.jar"); in test_getJarFile29() local
144 jarFile.deleteOnExit(); in test_getJarFile29()
145 JarOutputStream out = new JarOutputStream(new FileOutputStream(jarFile)); in test_getJarFile29()
151 + jarFile.getAbsolutePath().replaceAll(" ", "%20") + "!/") in test_getJarFile29()
211 FileOutputStream jarFile = new FileOutputStream(file); in test_getInputStream_DeleteJarFileUsingURLConnection() local
213 jarFile)); in test_getInputStream_DeleteJarFileUsingURLConnection()
/libcore/luni/src/test/java/libcore/java/net/
DOldJarURLConnectionTest.java46 private URL createContent(String jarFile, String inFile) in createContent() argument
51 Support_Resources.copyFile(resources, "net", jarFile); in createContent()
52 File file = new File(resources.toString() + "/net/" + jarFile); in createContent()
211 File jarFile = File.createTempFile("1+2 3", "test.jar"); in test_getJarFile29() local
212 jarFile.deleteOnExit(); in test_getJarFile29()
213 JarOutputStream out = new JarOutputStream(new FileOutputStream(jarFile)); in test_getJarFile29()
219 + jarFile.getAbsolutePath().replaceAll(" ", "%20") + "!/") in test_getJarFile29()
291 File jarFile = File.createTempFile("file", ".jar", tmpDir); in test_getInputStream_DeleteJarFileUsingURLConnection() local
292 String jarFileName = jarFile.getPath(); in test_getInputStream_DeleteJarFileUsingURLConnection()
307 assertTrue(jarFile.delete()); in test_getInputStream_DeleteJarFileUsingURLConnection()
/libcore/luni/src/test/java/libcore/dalvik/system/
DPathClassLoaderTest.java104 JarFile jarFile = new JarFile(f, true /* verify */, ZipFile.OPEN_READ); in test_classLoader_tampered_certificate_loadsOK_nullCertificates() local
106 JarEntry signedEntry = (JarEntry) jarFile.getEntry(signedEntryName); in test_classLoader_tampered_certificate_loadsOK_nullCertificates()
112 jarFile.close(); in test_classLoader_tampered_certificate_loadsOK_nullCertificates()
/libcore/luni/src/test/java/libcore/java/util/zip/
DOldAndroidZipStressTest.java39 JarFile jarFile = new JarFile(file); in checkJarCertificates() local
40 JarEntry je = jarFile.getJarEntry("AndroidManifest.xml"); in checkJarCertificates()
46 InputStream is = jarFile.getInputStream(je); in checkJarCertificates()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DClassLoaderTest.java229 private static boolean isJarFileClosed(JarFile jarFile) { in isJarFileClosed() argument
232 jarFile.getEntry("anyName"); in isJarFileClosed()
/libcore/ojluni/src/main/java/sun/misc/
DURLClassPath.java731 JarFile jarFile = ((JarURLConnection)uc).getJarFile();
732 return checkJar(jarFile);