Code example for ReadableByteChannel

Methods: isOpen

0
    } 
 
    public final long transferFrom(ReadableByteChannel src, long position,
            long count) throws IOException {
        openCheck(); 
        if (!src.isOpen()) {
            throw new ClosedChannelException();
        } 
        throw new NonWritableChannelException();
    } 
 
    public final MappedByteBuffer map(MapMode mode, long position, long size)
            throws IOException { 
        openCheck(); 
        if (mode == null) {
            throw new NullPointerException();
        } 
        if (position < 0 || size < 0 || size > Integer.MAX_VALUE) {
            throw new IllegalArgumentException();
        } 
        if (mode != MapMode.READ_ONLY) {