code: private void readFully(ByteBuffer dst) throws IOException
     {
        int r = channel.read(dst);
  
        if (r < 0)
           throw new EOFException();
        if (r < dst.capacity() && r > 0)
           throw new StreamCorruptedException("Unexpected EOF in middle of data block.");
     }
docs: Reads a sequence of bytes from file into the given buffer.
  
  @param dst
  buffer
  @throws IOException
  if any Exception is occurred