char nmode = 0;
if (mode == MapMode.READ_ONLY)
{
nmode = 'r';
if ((this.mode & READ) == 0)
throw new NonReadableChannelException();
}
else if (mode == MapMode.READ_WRITE || mode == MapMode.PRIVATE)
{
nmode = mode == MapMode.READ_WRITE ? '+' : 'c';
if ((this.mode & WRITE) != WRITE)
throw new NonWritableChannelException();
if ((this.mode & READ) != READ)
throw new NonReadableChannelException();
}
else
throw new IllegalArgumentException ("mode: " + mode);
if (((position + size) | position | size) < 0 || size > Integer.MAX_VALUE)