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 28 package java.net; 29 30 import java.io.IOException; 31 32 @SuppressWarnings({"unchecked", "deprecation", "all"}) 33 public abstract class SocketImpl implements java.net.SocketOptions { 34 35 public SocketImpl() { throw new RuntimeException("Stub!"); } 36 37 protected abstract void create(boolean stream) throws java.io.IOException; 38 39 protected abstract void connect(java.lang.String host, int port) throws java.io.IOException; 40 41 protected abstract void connect(java.net.InetAddress address, int port) throws java.io.IOException; 42 43 protected abstract void connect(java.net.SocketAddress address, int timeout) throws java.io.IOException; 44 45 protected abstract void bind(java.net.InetAddress host, int port) throws java.io.IOException; 46 47 protected abstract void listen(int backlog) throws java.io.IOException; 48 49 protected abstract void accept(java.net.SocketImpl s) throws java.io.IOException; 50 51 protected abstract java.io.InputStream getInputStream() throws java.io.IOException; 52 53 protected abstract java.io.OutputStream getOutputStream() throws java.io.IOException; 54 55 protected abstract int available() throws java.io.IOException; 56 57 protected abstract void close() throws java.io.IOException; 58 59 protected void shutdownInput() throws java.io.IOException { throw new RuntimeException("Stub!"); } 60 61 protected void shutdownOutput() throws java.io.IOException { throw new RuntimeException("Stub!"); } 62 63 protected java.io.FileDescriptor getFileDescriptor() { throw new RuntimeException("Stub!"); } 64 65 @android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES) 66 @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) 67 public java.io.FileDescriptor getFD$() { throw new RuntimeException("Stub!"); } 68 69 protected java.net.InetAddress getInetAddress() { throw new RuntimeException("Stub!"); } 70 71 protected int getPort() { throw new RuntimeException("Stub!"); } 72 73 protected boolean supportsUrgentData() { throw new RuntimeException("Stub!"); } 74 75 protected abstract void sendUrgentData(int data) throws java.io.IOException; 76 77 protected int getLocalPort() { throw new RuntimeException("Stub!"); } 78 79 public java.lang.String toString() { throw new RuntimeException("Stub!"); } 80 81 protected void setPerformancePreferences(int connectionTime, int latency, int bandwidth) { throw new RuntimeException("Stub!"); } 82 83 protected java.net.InetAddress address; 84 85 protected java.io.FileDescriptor fd; 86 87 protected int localport; 88 89 protected int port; 90 } 91 92