/** * Same as getInputStream(socket, socket.getSoTimeout()).<br> * <br> * From documentation for {@link #getInputStream(Socket, long)}:<br> * Returns InputStream for the socket. If the socket has an associated * SocketChannel then it returns a {@link SocketInputStream} with the given timeout. If the socket does not * have a channel, {@link Socket#getInputStream()} is returned. In the later * case, the timeout argument is ignored and the timeout set with {@link Socket#setSoTimeout(int)} applies for * reads.<br> * <br> * Any socket created using socket factories returned by {@link #NetUtils}, * must use this interface instead of {@link Socket#getInputStream()}. * * @see #getInputStream(Socket, long) * @param socket * @return InputStream for reading from the socket. * @throws IOException */ public static InputStream getInputStream(Socket socket) throws IOException { return getInputStream(socket, socket.getSoTimeout()); }
/** * Same as getInputStream(socket, socket.getSoTimeout()).<br> * <br> * From documentation for {@link #getInputStream(Socket, long)}:<br> * Returns InputStream for the socket. If the socket has an associated * SocketChannel then it returns a {@link SocketInputStream} with the given timeout. If the socket does not * have a channel, {@link Socket#getInputStream()} is returned. In the later * case, the timeout argument is ignored and the timeout set with {@link Socket#setSoTimeout(int)} applies for * reads.<br> * <br> * Any socket created using socket factories returned by {@link #NetUtils}, * must use this interface instead of {@link Socket#getInputStream()}. * * @see #getInputStream(Socket, long) * @param socket * @return InputStream for reading from the socket. * @throws IOException */ public static InputStream getInputStream(Socket socket) throws IOException { return getInputStream(socket, socket.getSoTimeout()); }
.getInputStream(socket)))); this.out = new DataOutputStream(new BufferedOutputStream(NetUtils.getOutputStream(socket))); writeHeader();
.getInputStream(socket)))); this.out = new DataOutputStream(new BufferedOutputStream(NetUtils.getOutputStream(socket))); writeHeader();