List of usage examples for java.nio.channels SeekableByteChannel isOpen
public boolean isOpen();
From source file:com.spectralogic.ds3client.helpers.channels.WindowedSeekableByteChannel_Test.java
@Test(timeout = 1000) public void closeChangesIsOpen() throws IOException { try (final SeekableByteChannel channel = stringToChannel("aabbbcccc")) { final Object lock = new Object(); final SeekableByteChannel window = new WindowedSeekableByteChannel(channel, lock, 0L, 2L); assertThat(window.isOpen(), is(true)); window.close();//from w w w.j a v a 2s .c om assertThat(window.isOpen(), is(false)); } }