/** * Map the region of the channel * @throws java.io.IOException if there is a problem with creating the map */ void open() throws java.io.IOException { if (source != null) return; if (!channel.isOpen()) throw new IllegalStateException("Channel is closed"); source = new ByteBufferRandomAccessSource(channel.map(FileChannel.MapMode.READ_ONLY, offset, length)); }
/** * Map the region of the channel * @throws java.io.IOException if there is a problem with creating the map */ void open() throws java.io.IOException { if (source != null) return; if (!channel.isOpen()) throw new IllegalStateException("Channel is closed"); source = new ByteBufferRandomAccessSource(channel.map(FileChannel.MapMode.READ_ONLY, offset, length)); }