< prev index next >

src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java

Print this page

        

*** 43,53 **** * before and after, respectively, invoking an I/O operation that might block * indefinitely. In order to ensure that the {@link #end end} method is always * invoked, these methods should be used within a * {@code try}&nbsp;...&nbsp;{@code finally} block: * ! * <blockquote><pre> * boolean completed = false; * try { * begin(); * completed = ...; // Perform blocking I/O operation * return ...; // Return result --- 43,53 ---- * before and after, respectively, invoking an I/O operation that might block * indefinitely. In order to ensure that the {@link #end end} method is always * invoked, these methods should be used within a * {@code try}&nbsp;...&nbsp;{@code finally} block: * ! * <blockquote><pre id="be"> * boolean completed = false; * try { * begin(); * completed = ...; // Perform blocking I/O operation * return ...; // Return result
< prev index next >