@Override public SeekableByteChannel position(long newPosition) throws IOException { checkAllExceptions(); delegate.position(newPosition); return this; }
@Override public boolean isOpen() { checkUndeclaredExceptions(); return delegate.isOpen(); }
private void checkAllExceptions() throws IOException { control.check(this, IOException.class); checkUndeclaredExceptions(); }
@Override public long size() throws IOException { checkAllExceptions(); return delegate.size(); }
@Override public long position() throws IOException { checkAllExceptions(); return delegate.position(); }
@Override public int read(ByteBuffer dst) throws IOException { checkAllExceptions(); return delegate.read(dst); }
@Override public int write(ByteBuffer src) throws IOException { checkAllExceptions(); return delegate.write(src); }
@Override public SeekableByteChannel truncate(long size) throws IOException { checkAllExceptions(); delegate.truncate(size); return this; }
@Override public void close() throws IOException { checkAllExceptions(); delegate.close(); } }