1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * Copyright (c) 1995, 2015, 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.net; 28 29 import android.compat.annotation.UnsupportedAppUsage; 30 31 @SuppressWarnings({"unchecked", "deprecation", "all"}) 32 public final class URL implements java.io.Serializable { 33 URL(java.lang.String protocol, java.lang.String host, int port, java.lang.String file)34 public URL(java.lang.String protocol, java.lang.String host, int port, java.lang.String file) 35 throws java.net.MalformedURLException { 36 throw new RuntimeException("Stub!"); 37 } 38 URL(java.lang.String protocol, java.lang.String host, java.lang.String file)39 public URL(java.lang.String protocol, java.lang.String host, java.lang.String file) 40 throws java.net.MalformedURLException { 41 throw new RuntimeException("Stub!"); 42 } 43 URL( java.lang.String protocol, java.lang.String host, int port, java.lang.String file, java.net.URLStreamHandler handler)44 public URL( 45 java.lang.String protocol, 46 java.lang.String host, 47 int port, 48 java.lang.String file, 49 java.net.URLStreamHandler handler) 50 throws java.net.MalformedURLException { 51 throw new RuntimeException("Stub!"); 52 } 53 URL(java.lang.String spec)54 public URL(java.lang.String spec) throws java.net.MalformedURLException { 55 throw new RuntimeException("Stub!"); 56 } 57 URL(java.net.URL context, java.lang.String spec)58 public URL(java.net.URL context, java.lang.String spec) throws java.net.MalformedURLException { 59 throw new RuntimeException("Stub!"); 60 } 61 URL(java.net.URL context, java.lang.String spec, java.net.URLStreamHandler handler)62 public URL(java.net.URL context, java.lang.String spec, java.net.URLStreamHandler handler) 63 throws java.net.MalformedURLException { 64 throw new RuntimeException("Stub!"); 65 } 66 isValidProtocol(java.lang.String protocol)67 private boolean isValidProtocol(java.lang.String protocol) { 68 throw new RuntimeException("Stub!"); 69 } 70 checkSpecifyHandler(java.lang.SecurityManager sm)71 private void checkSpecifyHandler(java.lang.SecurityManager sm) { 72 throw new RuntimeException("Stub!"); 73 } 74 set( java.lang.String protocol, java.lang.String host, int port, java.lang.String file, java.lang.String ref)75 void set( 76 java.lang.String protocol, 77 java.lang.String host, 78 int port, 79 java.lang.String file, 80 java.lang.String ref) { 81 throw new RuntimeException("Stub!"); 82 } 83 set( java.lang.String protocol, java.lang.String host, int port, java.lang.String authority, java.lang.String userInfo, java.lang.String path, java.lang.String query, java.lang.String ref)84 void set( 85 java.lang.String protocol, 86 java.lang.String host, 87 int port, 88 java.lang.String authority, 89 java.lang.String userInfo, 90 java.lang.String path, 91 java.lang.String query, 92 java.lang.String ref) { 93 throw new RuntimeException("Stub!"); 94 } 95 getQuery()96 public java.lang.String getQuery() { 97 throw new RuntimeException("Stub!"); 98 } 99 getPath()100 public java.lang.String getPath() { 101 throw new RuntimeException("Stub!"); 102 } 103 getUserInfo()104 public java.lang.String getUserInfo() { 105 throw new RuntimeException("Stub!"); 106 } 107 getAuthority()108 public java.lang.String getAuthority() { 109 throw new RuntimeException("Stub!"); 110 } 111 getPort()112 public int getPort() { 113 throw new RuntimeException("Stub!"); 114 } 115 getDefaultPort()116 public int getDefaultPort() { 117 throw new RuntimeException("Stub!"); 118 } 119 getProtocol()120 public java.lang.String getProtocol() { 121 throw new RuntimeException("Stub!"); 122 } 123 getHost()124 public java.lang.String getHost() { 125 throw new RuntimeException("Stub!"); 126 } 127 getFile()128 public java.lang.String getFile() { 129 throw new RuntimeException("Stub!"); 130 } 131 getRef()132 public java.lang.String getRef() { 133 throw new RuntimeException("Stub!"); 134 } 135 equals(java.lang.Object obj)136 public boolean equals(java.lang.Object obj) { 137 throw new RuntimeException("Stub!"); 138 } 139 hashCode()140 public synchronized int hashCode() { 141 throw new RuntimeException("Stub!"); 142 } 143 sameFile(java.net.URL other)144 public boolean sameFile(java.net.URL other) { 145 throw new RuntimeException("Stub!"); 146 } 147 toString()148 public java.lang.String toString() { 149 throw new RuntimeException("Stub!"); 150 } 151 toExternalForm()152 public java.lang.String toExternalForm() { 153 throw new RuntimeException("Stub!"); 154 } 155 toURI()156 public java.net.URI toURI() throws java.net.URISyntaxException { 157 throw new RuntimeException("Stub!"); 158 } 159 openConnection()160 public java.net.URLConnection openConnection() throws java.io.IOException { 161 throw new RuntimeException("Stub!"); 162 } 163 openConnection(java.net.Proxy proxy)164 public java.net.URLConnection openConnection(java.net.Proxy proxy) throws java.io.IOException { 165 throw new RuntimeException("Stub!"); 166 } 167 openStream()168 public java.io.InputStream openStream() throws java.io.IOException { 169 throw new RuntimeException("Stub!"); 170 } 171 getContent()172 public java.lang.Object getContent() throws java.io.IOException { 173 throw new RuntimeException("Stub!"); 174 } 175 getContent(java.lang.Class[] classes)176 public java.lang.Object getContent(java.lang.Class[] classes) throws java.io.IOException { 177 throw new RuntimeException("Stub!"); 178 } 179 setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory fac)180 public static void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory fac) { 181 throw new RuntimeException("Stub!"); 182 } 183 getURLStreamHandler(java.lang.String protocol)184 static java.net.URLStreamHandler getURLStreamHandler(java.lang.String protocol) { 185 throw new RuntimeException("Stub!"); 186 } 187 createBuiltinHandler(java.lang.String protocol)188 private static java.net.URLStreamHandler createBuiltinHandler(java.lang.String protocol) 189 throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, 190 java.lang.InstantiationException { 191 throw new RuntimeException("Stub!"); 192 } 193 createBuiltinHandlerClassNames()194 private static java.util.Set<java.lang.String> createBuiltinHandlerClassNames() { 195 throw new RuntimeException("Stub!"); 196 } 197 writeObject(java.io.ObjectOutputStream s)198 private synchronized void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { 199 throw new RuntimeException("Stub!"); 200 } 201 readObject(java.io.ObjectInputStream s)202 private synchronized void readObject(java.io.ObjectInputStream s) 203 throws java.lang.ClassNotFoundException, java.io.IOException { 204 throw new RuntimeException("Stub!"); 205 } 206 readResolve()207 private java.lang.Object readResolve() throws java.io.ObjectStreamException { 208 throw new RuntimeException("Stub!"); 209 } 210 setDeserializedFields(java.net.URLStreamHandler handler)211 private java.net.URL setDeserializedFields(java.net.URLStreamHandler handler) { 212 throw new RuntimeException("Stub!"); 213 } 214 fabricateNewURL()215 private java.net.URL fabricateNewURL() throws java.io.InvalidObjectException { 216 throw new RuntimeException("Stub!"); 217 } 218 isBuiltinStreamHandler(java.lang.String handlerClassName)219 private boolean isBuiltinStreamHandler(java.lang.String handlerClassName) { 220 throw new RuntimeException("Stub!"); 221 } 222 resetState()223 private void resetState() { 224 throw new RuntimeException("Stub!"); 225 } 226 setSerializedHashCode(int hc)227 private void setSerializedHashCode(int hc) { 228 throw new RuntimeException("Stub!"); 229 } 230 231 private static final java.util.Set<java.lang.String> BUILTIN_HANDLER_CLASS_NAMES; 232 233 static { 234 BUILTIN_HANDLER_CLASS_NAMES = null; 235 } 236 237 private java.lang.String authority; 238 239 @UnsupportedAppUsage 240 static java.net.URLStreamHandlerFactory factory; 241 242 private java.lang.String file; 243 244 @UnsupportedAppUsage 245 transient java.net.URLStreamHandler handler; 246 247 @UnsupportedAppUsage 248 static java.util.Hashtable<java.lang.String, java.net.URLStreamHandler> handlers; 249 250 private int hashCode = -1; // 0xffffffff 251 252 private java.lang.String host; 253 254 transient java.net.InetAddress hostAddress; 255 256 private transient java.lang.String path; 257 258 private int port = -1; // 0xffffffff 259 260 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) 261 private java.lang.String protocol; 262 263 private static final java.lang.String protocolPathProp = "java.protocol.handler.pkgs"; 264 265 private transient java.lang.String query; 266 267 private java.lang.String ref; 268 269 private static final java.io.ObjectStreamField[] serialPersistentFields; 270 271 static { 272 serialPersistentFields = new java.io.ObjectStreamField[0]; 273 } 274 275 static final long serialVersionUID = -7627629688361524110L; // 0x962537361afce472L 276 277 private static java.lang.Object streamHandlerLock; 278 279 private transient java.lang.String userInfo; 280 } 281