public void engineNextBytes(byte[] bytes) {
      if (DEBUG && debuglevel > 8) debug(">>> engineNextBytes()");
      if (!adaptee.isInitialised()) {
         this.engineSetSeed(new byte[0]);
      }

      while (true) {
         try {
            adaptee.nextBytes(bytes, 0, bytes.length);
            break;
         } catch (LimitReachedException x) { // reseed the generator
            if (DEBUG) {
               debug(LIMIT_REACHED_MSG + String.valueOf(x));
               x.printStackTrace(err);
               debug(RESEED);
            }
            resetLocalPRNG();
         }
      }
      if (DEBUG && debuglevel > 8) debug("<<< engineNextBytes()");
   }