mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +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
|
@ -448,15 +448,15 @@ public final class Channels {
|
|||
*
|
||||
* <p> An invocation of this method of the form
|
||||
*
|
||||
* <pre> {@code
|
||||
* {@snippet lang=java :
|
||||
* Channels.newReader(ch, csname)
|
||||
* } </pre>
|
||||
* }
|
||||
*
|
||||
* behaves in exactly the same way as the expression
|
||||
*
|
||||
* <pre> {@code
|
||||
* {@snippet lang=java :
|
||||
* Channels.newReader(ch, Charset.forName(csName))
|
||||
* } </pre>
|
||||
* }
|
||||
*
|
||||
* @param ch
|
||||
* The channel from which bytes will be read
|
||||
|
@ -483,15 +483,15 @@ public final class Channels {
|
|||
*
|
||||
* <p> An invocation of this method of the form
|
||||
*
|
||||
* <pre> {@code
|
||||
* {@snippet lang=java :
|
||||
* Channels.newReader(ch, charset)
|
||||
* } </pre>
|
||||
* }
|
||||
*
|
||||
* behaves in exactly the same way as the expression
|
||||
*
|
||||
* <pre> {@code
|
||||
* {@snippet lang=java :
|
||||
* Channels.newReader(ch, charset.newDecoder(), -1)
|
||||
* } </pre>
|
||||
* }
|
||||
*
|
||||
* <p> The reader's default action for malformed-input and unmappable-character
|
||||
* errors is to {@linkplain java.nio.charset.CodingErrorAction#REPORT report}
|
||||
|
@ -548,15 +548,15 @@ public final class Channels {
|
|||
*
|
||||
* <p> An invocation of this method of the form
|
||||
*
|
||||
* <pre> {@code
|
||||
* {@snippet lang=java :
|
||||
* Channels.newWriter(ch, csname)
|
||||
* } </pre>
|
||||
* }
|
||||
*
|
||||
* behaves in exactly the same way as the expression
|
||||
*
|
||||
* <pre> {@code
|
||||
* {@snippet lang=java :
|
||||
* Channels.newWriter(ch, Charset.forName(csName))
|
||||
* } </pre>
|
||||
* }
|
||||
*
|
||||
* @param ch
|
||||
* The channel to which bytes will be written
|
||||
|
@ -583,15 +583,15 @@ public final class Channels {
|
|||
*
|
||||
* <p> An invocation of this method of the form
|
||||
*
|
||||
* <pre> {@code
|
||||
* {@snippet lang=java :
|
||||
* Channels.newWriter(ch, charset)
|
||||
* } </pre>
|
||||
* }
|
||||
*
|
||||
* behaves in exactly the same way as the expression
|
||||
*
|
||||
* <pre> {@code
|
||||
* {@snippet lang=java :
|
||||
* Channels.newWriter(ch, charset.newEncoder(), -1)
|
||||
* } </pre>
|
||||
* }
|
||||
*
|
||||
* <p> The writer's default action for malformed-input and unmappable-character
|
||||
* errors is to {@linkplain java.nio.charset.CodingErrorAction#REPORT report}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue