mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8307409: Refactor usage examples to use @snippet in the java.nio packages
Reviewed-by: alanb, rriggs
This commit is contained in:
parent
e512a20679
commit
9fa8b9a4a6
33 changed files with 433 additions and 386 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2023, 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
|
||||
|
@ -102,7 +102,7 @@ import java.net.StandardSocketOptions; // javadoc
|
|||
* </ol>
|
||||
*
|
||||
* <p> <b>Usage Example:</b>
|
||||
* <pre>
|
||||
* {@snippet lang=java :
|
||||
* // join multicast group on this interface, and also use this
|
||||
* // interface for outgoing multicast datagrams
|
||||
* NetworkInterface ni = NetworkInterface.getByName("hme0");
|
||||
|
@ -115,7 +115,7 @@ import java.net.StandardSocketOptions; // javadoc
|
|||
* InetAddress group = InetAddress.getByName("225.4.5.6");
|
||||
*
|
||||
* MembershipKey key = dc.join(group, ni);
|
||||
* </pre>
|
||||
* }
|
||||
*
|
||||
* @spec https://www.rfc-editor.org/info/rfc2236
|
||||
* RFC 2236: Internet Group Management Protocol, Version 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue