< prev index next >

src/java.base/share/classes/java/net/DatagramSocketImpl.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 265,284 **** } /** * Called to set a socket option. * * @param name The socket option * * @param value The value of the socket option. A value of {@code null} * may be valid for some options. * * @throws UnsupportedOperationException if the DatagramSocketImpl does not * support the option * * @throws NullPointerException if name is {@code null} ! * * @since 1.9 */ protected <T> void setOption(SocketOption<T> name, T value) throws IOException { if (name == StandardSocketOptions.SO_SNDBUF) { setOption(SocketOptions.SO_SNDBUF, value); --- 265,285 ---- } /** * Called to set a socket option. * + * @param <T> The type of the socket option value * @param name The socket option * * @param value The value of the socket option. A value of {@code null} * may be valid for some options. * * @throws UnsupportedOperationException if the DatagramSocketImpl does not * support the option * * @throws NullPointerException if name is {@code null} ! * @throws IOException if an I/O problem occurs while attempting to set the option * @since 1.9 */ protected <T> void setOption(SocketOption<T> name, T value) throws IOException { if (name == StandardSocketOptions.SO_SNDBUF) { setOption(SocketOptions.SO_SNDBUF, value);
*** 306,321 **** --- 307,325 ---- } /** * Called to get a socket option. * + * @return the socket option + * @param <T> The type of the socket option value * @param name The socket option * * @throws UnsupportedOperationException if the DatagramSocketImpl does not * support the option * * @throws NullPointerException if name is {@code null} + * @throws IOException if an I/O problem occurs while attempting to set the option * * @since 1.9 */ @SuppressWarnings("unchecked") protected <T> T getOption(SocketOption<T> name) throws IOException {
< prev index next >