jax-ws
  1. jax-ws
  2. JAX_WS-1032

SAAJ memory issue with large files

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.2.5
    • Fix Version/s: None
    • Component/s: runtime
    • Labels:
      None

      Description

      Please fix the rather naive implementation of com.sun.xml.ws.message.saaj.SAAJMessage.SAAJAttachment.writeTo(OutputStream)

      public void writeTo(OutputStream os) throws IOException {
      os.write(asByteArray());
      }

      Streams can be copied efficiently with a buffer, but this bug loads the entire binary into memory.
      for example using
      http://commons.apache.org/io/api-1.4/org/apache/commons/io/IOUtils.html#copyLarge(java.io.InputStream, java.io.OutputStream)

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Iaroslav Savytskyi
              Reporter:
              wsalembi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: