1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * Copyright (c) 1995, 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.net; 28 29 import android.compat.annotation.UnsupportedAppUsage; 30 31 @SuppressWarnings({"unchecked", "deprecation", "all"}) 32 public class Socket implements java.io.Closeable { 33 Socket()34 public Socket() { 35 throw new RuntimeException("Stub!"); 36 } 37 Socket(java.net.Proxy proxy)38 public Socket(java.net.Proxy proxy) { 39 throw new RuntimeException("Stub!"); 40 } 41 Socket(java.net.SocketImpl impl)42 protected Socket(java.net.SocketImpl impl) throws java.net.SocketException { 43 throw new RuntimeException("Stub!"); 44 } 45 Socket(java.lang.String host, int port)46 public Socket(java.lang.String host, int port) 47 throws java.io.IOException, java.net.UnknownHostException { 48 throw new RuntimeException("Stub!"); 49 } 50 Socket(java.net.InetAddress address, int port)51 public Socket(java.net.InetAddress address, int port) throws java.io.IOException { 52 throw new RuntimeException("Stub!"); 53 } 54 Socket(java.lang.String host, int port, java.net.InetAddress localAddr, int localPort)55 public Socket(java.lang.String host, int port, java.net.InetAddress localAddr, int localPort) 56 throws java.io.IOException { 57 throw new RuntimeException("Stub!"); 58 } 59 Socket( java.net.InetAddress address, int port, java.net.InetAddress localAddr, int localPort)60 public Socket( 61 java.net.InetAddress address, int port, java.net.InetAddress localAddr, int localPort) 62 throws java.io.IOException { 63 throw new RuntimeException("Stub!"); 64 } 65 66 @Deprecated Socket(java.lang.String host, int port, boolean stream)67 public Socket(java.lang.String host, int port, boolean stream) throws java.io.IOException { 68 throw new RuntimeException("Stub!"); 69 } 70 71 @Deprecated Socket(java.net.InetAddress host, int port, boolean stream)72 public Socket(java.net.InetAddress host, int port, boolean stream) throws java.io.IOException { 73 throw new RuntimeException("Stub!"); 74 } 75 Socket( java.net.InetAddress[] addresses, int port, java.net.SocketAddress localAddr, boolean stream)76 private Socket( 77 java.net.InetAddress[] addresses, 78 int port, 79 java.net.SocketAddress localAddr, 80 boolean stream) 81 throws java.io.IOException { 82 throw new RuntimeException("Stub!"); 83 } 84 nonNullAddress(java.net.InetAddress address)85 private static java.net.InetAddress[] nonNullAddress(java.net.InetAddress address) { 86 throw new RuntimeException("Stub!"); 87 } 88 createImpl(boolean stream)89 void createImpl(boolean stream) throws java.net.SocketException { 90 throw new RuntimeException("Stub!"); 91 } 92 checkOldImpl()93 private void checkOldImpl() { 94 throw new RuntimeException("Stub!"); 95 } 96 setImpl()97 void setImpl() { 98 throw new RuntimeException("Stub!"); 99 } 100 getImpl()101 java.net.SocketImpl getImpl() throws java.net.SocketException { 102 throw new RuntimeException("Stub!"); 103 } 104 connect(java.net.SocketAddress endpoint)105 public void connect(java.net.SocketAddress endpoint) throws java.io.IOException { 106 throw new RuntimeException("Stub!"); 107 } 108 connect(java.net.SocketAddress endpoint, int timeout)109 public void connect(java.net.SocketAddress endpoint, int timeout) throws java.io.IOException { 110 throw new RuntimeException("Stub!"); 111 } 112 bind(java.net.SocketAddress bindpoint)113 public void bind(java.net.SocketAddress bindpoint) throws java.io.IOException { 114 throw new RuntimeException("Stub!"); 115 } 116 checkAddress(java.net.InetAddress addr, java.lang.String op)117 private void checkAddress(java.net.InetAddress addr, java.lang.String op) { 118 throw new RuntimeException("Stub!"); 119 } 120 postAccept()121 final void postAccept() { 122 throw new RuntimeException("Stub!"); 123 } 124 setCreated()125 void setCreated() { 126 throw new RuntimeException("Stub!"); 127 } 128 setBound()129 void setBound() { 130 throw new RuntimeException("Stub!"); 131 } 132 setConnected()133 void setConnected() { 134 throw new RuntimeException("Stub!"); 135 } 136 getInetAddress()137 public java.net.InetAddress getInetAddress() { 138 throw new RuntimeException("Stub!"); 139 } 140 getLocalAddress()141 public java.net.InetAddress getLocalAddress() { 142 throw new RuntimeException("Stub!"); 143 } 144 getPort()145 public int getPort() { 146 throw new RuntimeException("Stub!"); 147 } 148 getLocalPort()149 public int getLocalPort() { 150 throw new RuntimeException("Stub!"); 151 } 152 getRemoteSocketAddress()153 public java.net.SocketAddress getRemoteSocketAddress() { 154 throw new RuntimeException("Stub!"); 155 } 156 getLocalSocketAddress()157 public java.net.SocketAddress getLocalSocketAddress() { 158 throw new RuntimeException("Stub!"); 159 } 160 getChannel()161 public java.nio.channels.SocketChannel getChannel() { 162 throw new RuntimeException("Stub!"); 163 } 164 getInputStream()165 public java.io.InputStream getInputStream() throws java.io.IOException { 166 throw new RuntimeException("Stub!"); 167 } 168 getOutputStream()169 public java.io.OutputStream getOutputStream() throws java.io.IOException { 170 throw new RuntimeException("Stub!"); 171 } 172 setTcpNoDelay(boolean on)173 public void setTcpNoDelay(boolean on) throws java.net.SocketException { 174 throw new RuntimeException("Stub!"); 175 } 176 getTcpNoDelay()177 public boolean getTcpNoDelay() throws java.net.SocketException { 178 throw new RuntimeException("Stub!"); 179 } 180 setSoLinger(boolean on, int linger)181 public void setSoLinger(boolean on, int linger) throws java.net.SocketException { 182 throw new RuntimeException("Stub!"); 183 } 184 getSoLinger()185 public int getSoLinger() throws java.net.SocketException { 186 throw new RuntimeException("Stub!"); 187 } 188 sendUrgentData(int data)189 public void sendUrgentData(int data) throws java.io.IOException { 190 throw new RuntimeException("Stub!"); 191 } 192 setOOBInline(boolean on)193 public void setOOBInline(boolean on) throws java.net.SocketException { 194 throw new RuntimeException("Stub!"); 195 } 196 getOOBInline()197 public boolean getOOBInline() throws java.net.SocketException { 198 throw new RuntimeException("Stub!"); 199 } 200 setSoTimeout(int timeout)201 public synchronized void setSoTimeout(int timeout) throws java.net.SocketException { 202 throw new RuntimeException("Stub!"); 203 } 204 getSoTimeout()205 public synchronized int getSoTimeout() throws java.net.SocketException { 206 throw new RuntimeException("Stub!"); 207 } 208 setSendBufferSize(int size)209 public synchronized void setSendBufferSize(int size) throws java.net.SocketException { 210 throw new RuntimeException("Stub!"); 211 } 212 getSendBufferSize()213 public synchronized int getSendBufferSize() throws java.net.SocketException { 214 throw new RuntimeException("Stub!"); 215 } 216 setReceiveBufferSize(int size)217 public synchronized void setReceiveBufferSize(int size) throws java.net.SocketException { 218 throw new RuntimeException("Stub!"); 219 } 220 getReceiveBufferSize()221 public synchronized int getReceiveBufferSize() throws java.net.SocketException { 222 throw new RuntimeException("Stub!"); 223 } 224 setKeepAlive(boolean on)225 public void setKeepAlive(boolean on) throws java.net.SocketException { 226 throw new RuntimeException("Stub!"); 227 } 228 getKeepAlive()229 public boolean getKeepAlive() throws java.net.SocketException { 230 throw new RuntimeException("Stub!"); 231 } 232 setTrafficClass(int tc)233 public void setTrafficClass(int tc) throws java.net.SocketException { 234 throw new RuntimeException("Stub!"); 235 } 236 getTrafficClass()237 public int getTrafficClass() throws java.net.SocketException { 238 throw new RuntimeException("Stub!"); 239 } 240 setReuseAddress(boolean on)241 public void setReuseAddress(boolean on) throws java.net.SocketException { 242 throw new RuntimeException("Stub!"); 243 } 244 getReuseAddress()245 public boolean getReuseAddress() throws java.net.SocketException { 246 throw new RuntimeException("Stub!"); 247 } 248 close()249 public synchronized void close() throws java.io.IOException { 250 throw new RuntimeException("Stub!"); 251 } 252 shutdownInput()253 public void shutdownInput() throws java.io.IOException { 254 throw new RuntimeException("Stub!"); 255 } 256 shutdownOutput()257 public void shutdownOutput() throws java.io.IOException { 258 throw new RuntimeException("Stub!"); 259 } 260 toString()261 public java.lang.String toString() { 262 throw new RuntimeException("Stub!"); 263 } 264 isConnected()265 public boolean isConnected() { 266 throw new RuntimeException("Stub!"); 267 } 268 isBound()269 public boolean isBound() { 270 throw new RuntimeException("Stub!"); 271 } 272 isClosed()273 public boolean isClosed() { 274 throw new RuntimeException("Stub!"); 275 } 276 isInputShutdown()277 public boolean isInputShutdown() { 278 throw new RuntimeException("Stub!"); 279 } 280 isOutputShutdown()281 public boolean isOutputShutdown() { 282 throw new RuntimeException("Stub!"); 283 } 284 setSocketImplFactory(java.net.SocketImplFactory fac)285 public static synchronized void setSocketImplFactory(java.net.SocketImplFactory fac) 286 throws java.io.IOException { 287 throw new RuntimeException("Stub!"); 288 } 289 setPerformancePreferences(int connectionTime, int latency, int bandwidth)290 public void setPerformancePreferences(int connectionTime, int latency, int bandwidth) { 291 throw new RuntimeException("Stub!"); 292 } 293 294 @UnsupportedAppUsage getFileDescriptor$()295 public java.io.FileDescriptor getFileDescriptor$() { 296 throw new RuntimeException("Stub!"); 297 } 298 299 private boolean bound = false; 300 301 private java.lang.Object closeLock; 302 303 private boolean closed = false; 304 305 private boolean connected = false; 306 307 private boolean created = false; 308 309 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) 310 private static java.net.SocketImplFactory factory; 311 312 @UnsupportedAppUsage 313 java.net.SocketImpl impl; 314 315 private boolean oldImpl = false; 316 317 private boolean shutIn = false; 318 319 private boolean shutOut = false; 320 } 321