Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8188048

Add SplittableRandom.nextBytes

    XMLWordPrintable

Details

    • CSR
    • Status: Closed
    • P3
    • Resolution: Approved
    • 10
    • core-libs
    • None
    • minimal
    • None. This is a new method on a final class.
    • Java API
    • SE

    Description

      Summary

      Add SplittableRandom.nextBytes(byte[]).

      Problem

      java.util.Random has a nextBytes method, and SplittableRandom implements most Random methods, but nextBytes was missed.

      Solution

      Implement nextBytes in the obvious way.

      Specification

          /**
           * Fills a user-supplied byte array with generated pseudorandom bytes.
           *
           * @param  bytes the byte array to fill with pseudorandom bytes
           * @throws NullPointerException if bytes is null
           * @since  10
           */
          public void nextBytes(byte[] bytes) {

      Attachments

        Issue Links

          Activity

            People

              martin Martin Buchholz
              martin Martin Buchholz
              Doug Lea, Paul Sandoz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: