Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: tbd_major
    • Component/s: core-libs
    • Labels:

      Description

      A method is needed to read up to a specific number of bytes from a stream that handles the allocation of the array similar to readAllBytes().

      Reading up to nbytes can guard against excessive unexpected input while not requiring an array allocation for the full size.

      The implementation of InputStream.readAllBytes() already has the functionality but does not limit the input size.

      A similar function already exists in sun/security/util/IOUtils.java but is not public.

        Issue Links

          Activity

          Hide
          bpb Brian Burkhalter added a comment -
          Reopening as this does not appear after all to be a duplicate.
          Show
          bpb Brian Burkhalter added a comment - Reopening as this does not appear after all to be a duplicate.

            People

            • Assignee:
              bpb Brian Burkhalter
              Reporter:
              rriggs Roger Riggs
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: