Axiom
  1. Axiom
  2. AXIOM-236

When inlining a DataHandler as Base64, OMTextImpl doesn't stream the data

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.9
    • Component/s: None
    • Labels:
      None

      Description

      When converting a DataHandler to Base64, OMTextImpl#writeOutput ends up calling OMTextImpl#getText, meaning that Axiom will construct a single String from the complete DataHandler content. For large contents this will inevitably lead to out of memory errors. The correct strategy would be to stream the data, i.e. to do the conversion in chunks and write several CHARACTER events to the XmlStreamWriter.

      Both LLOM's OMTextImpl and DOOM's TextImpl are affected by this problem.

        Issue Links

          Activity

            People

            • Assignee:
              Andreas Veithen
              Reporter:
              Andreas Veithen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development