Пример #1
0
 public long read(ByteBuffer[] dsts, int offset, int length) throws IOException {
   if ((offset < 0) || (length < 0) || (offset > dsts.length - length))
     throw new IndexOutOfBoundsException();
   try {
     return read(Util.subsequence(dsts, offset, length));
   } catch (AsynchronousCloseException x) {
     close();
     throw x;
   }
 }
 public long write(ByteBuffer[] srcs, int offset, int length) throws IOException {
   if ((offset < 0) || (length < 0) || (offset > srcs.length - length))
     throw new IndexOutOfBoundsException();
   // ## Fix IOUtil.write so that we can avoid this array copy
   return write0(Util.subsequence(srcs, offset, length));
 }
 public long read(ByteBuffer[] dsts, int offset, int length) throws IOException {
   if ((offset < 0) || (length < 0) || (offset > dsts.length - length))
     throw new IndexOutOfBoundsException();
   return read(Util.subsequence(dsts, offset, length));
 }