Add method for counting leading non-negative bytes in byte arrays

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P3
    • None
    • Affects Version/s: None
    • Component/s: core-libs
    • None

      Internally we've implemented the package private method java.lang.StringCoding.countPositives for efficiently counting positive bytes in a byte array. This has been developed and deployed to support the needs of built-in charset encoders/decoders, where counting positives is a quick ASCII test. It appears there's utility for such a method elsewhere - not the least in non-builtin decoders and encoders - so we should consider exposing this as a public API.

      Suggestion to add a public method to java.util.Arrays, delegating when appropriate to the internal method in java.lang.StringCoding

            Assignee:
            Unassigned
            Reporter:
            Claes Redestad
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: