1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 * 6 * This code is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 only, as 8 * published by the Free Software Foundation. Oracle designates this 9 * particular file as subject to the "Classpath" exception as provided 10 * by Oracle in the LICENSE file that accompanied this code. 11 * 12 * This code is distributed in the hope that it will be useful, but WITHOUT 13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 * version 2 for more details (a copy is included in the LICENSE file that 16 * accompanied this code). 17 * 18 * You should have received a copy of the GNU General Public License version 19 * 2 along with this work; if not, write to the Free Software Foundation, 20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 21 * 22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 23 * or visit www.oracle.com if you need additional information or have any 24 * questions. 25 */ 26 27 package java.util.jar; 28 29 import dalvik.annotation.compat.UnsupportedAppUsage; 30 31 @SuppressWarnings({"unchecked", "deprecation", "all"}) 32 public class JarFile extends java.util.zip.ZipFile { 33 JarFile(java.lang.String name)34 public JarFile(java.lang.String name) throws java.io.IOException { 35 super((java.lang.String) null); 36 throw new RuntimeException("Stub!"); 37 } 38 JarFile(java.lang.String name, boolean verify)39 public JarFile(java.lang.String name, boolean verify) throws java.io.IOException { 40 super((java.lang.String) null); 41 throw new RuntimeException("Stub!"); 42 } 43 JarFile(java.io.File file)44 public JarFile(java.io.File file) throws java.io.IOException { 45 super((java.lang.String) null); 46 throw new RuntimeException("Stub!"); 47 } 48 JarFile(java.io.File file, boolean verify)49 public JarFile(java.io.File file, boolean verify) throws java.io.IOException { 50 super((java.lang.String) null); 51 throw new RuntimeException("Stub!"); 52 } 53 JarFile(java.io.File file, boolean verify, int mode)54 public JarFile(java.io.File file, boolean verify, int mode) throws java.io.IOException { 55 super((java.lang.String) null); 56 throw new RuntimeException("Stub!"); 57 } 58 getManifest()59 public java.util.jar.Manifest getManifest() throws java.io.IOException { 60 throw new RuntimeException("Stub!"); 61 } 62 getManifestFromReference()63 private synchronized java.util.jar.Manifest getManifestFromReference() 64 throws java.io.IOException { 65 throw new RuntimeException("Stub!"); 66 } 67 getMetaInfEntryNames()68 private native java.lang.String[] getMetaInfEntryNames(); 69 getJarEntry(java.lang.String name)70 public java.util.jar.JarEntry getJarEntry(java.lang.String name) { 71 throw new RuntimeException("Stub!"); 72 } 73 getEntry(java.lang.String name)74 public java.util.zip.ZipEntry getEntry(java.lang.String name) { 75 throw new RuntimeException("Stub!"); 76 } 77 entries()78 public java.util.Enumeration<java.util.jar.JarEntry> entries() { 79 throw new RuntimeException("Stub!"); 80 } 81 stream()82 public java.util.stream.Stream<java.util.jar.JarEntry> stream() { 83 throw new RuntimeException("Stub!"); 84 } 85 maybeInstantiateVerifier()86 private void maybeInstantiateVerifier() throws java.io.IOException { 87 throw new RuntimeException("Stub!"); 88 } 89 initializeVerifier()90 private void initializeVerifier() { 91 throw new RuntimeException("Stub!"); 92 } 93 getBytes(java.util.zip.ZipEntry ze)94 private byte[] getBytes(java.util.zip.ZipEntry ze) throws java.io.IOException { 95 throw new RuntimeException("Stub!"); 96 } 97 getInputStream(java.util.zip.ZipEntry ze)98 public synchronized java.io.InputStream getInputStream(java.util.zip.ZipEntry ze) 99 throws java.io.IOException { 100 throw new RuntimeException("Stub!"); 101 } 102 getManEntry()103 private synchronized java.util.jar.JarEntry getManEntry() { 104 throw new RuntimeException("Stub!"); 105 } 106 hasClassPathAttribute()107 public boolean hasClassPathAttribute() throws java.io.IOException { 108 throw new RuntimeException("Stub!"); 109 } 110 match(char[] src, byte[] b, int[] lastOcc, int[] optoSft)111 private boolean match(char[] src, byte[] b, int[] lastOcc, int[] optoSft) { 112 throw new RuntimeException("Stub!"); 113 } 114 checkForSpecialAttributes()115 private void checkForSpecialAttributes() throws java.io.IOException { 116 throw new RuntimeException("Stub!"); 117 } 118 newEntry(java.util.zip.ZipEntry ze)119 java.util.jar.JarEntry newEntry(java.util.zip.ZipEntry ze) { 120 throw new RuntimeException("Stub!"); 121 } 122 123 private static final char[] CLASSPATH_CHARS; 124 125 static { 126 CLASSPATH_CHARS = new char[0]; 127 } 128 129 private static final int[] CLASSPATH_LASTOCC; 130 131 static { 132 CLASSPATH_LASTOCC = new int[0]; 133 } 134 135 private static final int[] CLASSPATH_OPTOSFT; 136 137 static { 138 CLASSPATH_OPTOSFT = new int[0]; 139 } 140 141 public static final java.lang.String MANIFEST_NAME = "META-INF/MANIFEST.MF"; 142 143 private volatile boolean hasCheckedSpecialAttributes; 144 145 private boolean hasClassPathAttribute; 146 147 private java.util.jar.JarVerifier jv; 148 149 private boolean jvInitialized; 150 151 private java.util.jar.JarEntry manEntry; 152 153 @UnsupportedAppUsage 154 private java.util.jar.Manifest manifest; 155 156 private boolean verify; 157 158 @SuppressWarnings({"unchecked", "deprecation", "all"}) 159 private class JarEntryIterator 160 implements java.util.Enumeration<java.util.jar.JarEntry>, 161 java.util.Iterator<java.util.jar.JarEntry> { 162 JarEntryIterator()163 private JarEntryIterator() { 164 throw new RuntimeException("Stub!"); 165 } 166 hasNext()167 public boolean hasNext() { 168 throw new RuntimeException("Stub!"); 169 } 170 next()171 public java.util.jar.JarEntry next() { 172 throw new RuntimeException("Stub!"); 173 } 174 hasMoreElements()175 public boolean hasMoreElements() { 176 throw new RuntimeException("Stub!"); 177 } 178 nextElement()179 public java.util.jar.JarEntry nextElement() { 180 throw new RuntimeException("Stub!"); 181 } 182 183 final java.util.Enumeration<? extends java.util.zip.ZipEntry> e; 184 185 { 186 e = null; 187 } 188 } 189 190 @SuppressWarnings({"unchecked", "deprecation", "all"}) 191 private class JarFileEntry extends java.util.jar.JarEntry { 192 JarFileEntry(java.util.zip.ZipEntry ze)193 JarFileEntry(java.util.zip.ZipEntry ze) { 194 super((java.lang.String) null); 195 throw new RuntimeException("Stub!"); 196 } 197 getAttributes()198 public java.util.jar.Attributes getAttributes() throws java.io.IOException { 199 throw new RuntimeException("Stub!"); 200 } 201 getCertificates()202 public java.security.cert.Certificate[] getCertificates() { 203 throw new RuntimeException("Stub!"); 204 } 205 getCodeSigners()206 public java.security.CodeSigner[] getCodeSigners() { 207 throw new RuntimeException("Stub!"); 208 } 209 } 210 } 211