Package java.nio.channels

Examples of java.nio.channels.NonWritableChannelException


        throw new NonWritableChannelException();
    }

    public final int write(ByteBuffer buffer) throws IOException {
        openCheck();
        throw new NonWritableChannelException();
    }
View Full Code Here


            throws IOException {
        if (offset < 0 || length < 0 || (offset + length) > buffers.length) {
            throw new IndexOutOfBoundsException();
        }
        openCheck();
        throw new NonWritableChannelException();
    }
View Full Code Here

    public final FileChannel truncate(long size) throws IOException {
        openCheck();
        if (size < 0) {
            throw new IllegalArgumentException();
        }
        throw new NonWritableChannelException();
    }
View Full Code Here

            long count) throws IOException {
        openCheck();
        if (!src.isOpen()) {
            throw new ClosedChannelException();
        }
        throw new NonWritableChannelException();
    }
View Full Code Here

        }
        if (position < 0 || size < 0 || size > Integer.MAX_VALUE) {
            throw new IllegalArgumentException();
        }
        if (mode != MapMode.READ_ONLY) {
            throw new NonWritableChannelException();
        }
        return super.mapImpl(IMemorySystem.MMAP_READ_ONLY, position, size);
    }
View Full Code Here

    }

    protected final FileLock basicLock(long position, long size,
            boolean shared, boolean wait) throws IOException {
        if (!shared) {
            throw new NonWritableChannelException();
        }
        return super.basicLock(position, size, shared, true);
    }
View Full Code Here

        openCheck();
        if (!target.isOpen()) {
            throw new ClosedChannelException();
        }
        if (target instanceof ReadOnlyFileChannel) {
            throw new NonWritableChannelException();
        }
        if (position < 0 || count < 0) {
            throw new IllegalArgumentException();
        }
View Full Code Here

    }
  }

  void checkWritable() {
    if (!write) {
      throw new NonWritableChannelException();
    }
  }
View Full Code Here

  synchronized void write(byte[] buffer, int[] offArr, int len)
   throws IOException
  {
   int fd = getNativeFD();
   if ((mode & FileChannelImpl.WRITE) == 0)
    throw new NonWritableChannelException();
   fileWrite(fd, buffer, offArr, len, isNonBlocking);
  }
View Full Code Here

  {
    if (!isOpen ())
      throw new ClosedChannelException ();

    if ((mode & WRITE) == 0)
       throw new NonWritableChannelException ();

    boolean completed = false;
    int result;
    try
      {
View Full Code Here

TOP

Related Classes of java.nio.channels.NonWritableChannelException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.