mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +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) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 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
|
||||
|
@ -58,10 +58,11 @@ public interface ScatteringByteChannel
|
|||
* from this channel, where <i>r</i> is the total number of bytes remaining
|
||||
* the specified subsequence of the given buffer array, that is,
|
||||
*
|
||||
* <blockquote><pre>
|
||||
* dsts[offset].remaining()
|
||||
* + dsts[offset+1].remaining()
|
||||
* + ... + dsts[offset+length-1].remaining()</pre></blockquote>
|
||||
* {@snippet lang=java :
|
||||
* dsts[offset].remaining()
|
||||
* + dsts[offset+1].remaining()
|
||||
* + ... + dsts[offset+length-1].remaining()
|
||||
* }
|
||||
*
|
||||
* at the moment that this method is invoked.
|
||||
*
|
||||
|
@ -132,8 +133,9 @@ public interface ScatteringByteChannel
|
|||
* <p> An invocation of this method of the form {@code c.read(dsts)}
|
||||
* behaves in exactly the same manner as the invocation
|
||||
*
|
||||
* <blockquote><pre>
|
||||
* c.read(dsts, 0, dsts.length);</pre></blockquote>
|
||||
* {@snippet lang=java :
|
||||
* c.read(dsts, 0, dsts.length);
|
||||
* }
|
||||
*
|
||||
* @param dsts
|
||||
* The buffers into which bytes are to be transferred
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue