Velocity
  1. Velocity
  2. VELOCITY-793

Change ResourceLoader.getResourceStream to getResourceReader

    Details

    • Type: Wish Wish
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.x
    • Component/s: Engine
    • Labels:
      None

      Description

      It would be nice to use Readers instead of InputStreams for templates.

      Velocity is all about text-based rendering, so the templates are certainly going to be text-based. Using a Reader allows individual readers to determine the character encoding if necessary (say, from a database) and not have another component second-guess them.

      Of course, this is a serious change to the API. We could possible re-implement getResourceStream to read a Reader and provide bytes as backward-compatibility with older client code, but since we're going to 2.0, this would be the time to make breaking changes to the API.

        Activity

        Christopher Schultz created issue -
        Hide
        Nathan Bubna added a comment -

        I agree we should move to Readers in 2.0. It is, however, only a serious change to the API for advanced users, not template writers. Providing B.C. support would be nice, but is certainly not required nor even expected.

        Show
        Nathan Bubna added a comment - I agree we should move to Readers in 2.0. It is, however, only a serious change to the API for advanced users, not template writers. Providing B.C. support would be nice, but is certainly not required nor even expected.
        Mark Thomas made changes -
        Field Original Value New Value
        Workflow jira [ 12541794 ] Default workflow, editable Closed status [ 12551680 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551680 ] jira [ 12552554 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Christopher Schultz
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development