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

(scanner) Scanner should have constructor overloads that take Charset

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      Description

      Scanner currently has the following constructors that take a charset name:

      Scanner(File source, String charsetName)
      Scanner(InputStream source, String charsetName)
      Scanner(Path source, String charsetName)
      Scanner(ReadableByteChannel source, String charsetName)

      It would be nice to have overloads that take actual Charset objects instead of charset names, which must be looked up and converted into Charset objects.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                joehw Joe Wang
                Reporter:
                smarks Stuart Marks
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: