Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: