Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: unspecified
    • Fix Version/s: 4.1.1
    • Component/s: Documentation
    • Labels:
      None

      Description

      Method InputStream.read(buffer) returns number of bytes read into the buffer.

      Tapestry FAQ contains example "How do I stream a file to the user from tapestry?":
      byte[] data = new byte[1024];
      ...
      while (in.read(data) > -1)

      { out.write(data); }

      =============
      It should be something like:
      int len;
      while ((len = in.read(data)) > -1)

      { out.write(data, 0, len); }

      =============
      Or I'm wrong and response.setContentLength() will handle this?

      Tapestry FAQ:
      http://jakarta.apache.org/tapestry/faq.html#faq-N1012F

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Ivo Danihelka
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development