Class TextHelper

java.lang.Object
org.apache.axiom.om.util.TextHelper

public class TextHelper extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static OMText
    toOMText(byte[] b, int off, int length, OMFactory factory, boolean isOptimize)
    Create an OMText node from a byte array containing binary data If the byte array is large and the optimize flag is set, then the data is stored in a temp file to reduce in-core memory
    static OMText
    toOMText(byte[] b, int off, int length, OMFactory factory, boolean isOptimize, String attachmentDir)
    Create an OMText node from a byte array containing binary data If the byte array is large and the optimize flag is set, then the data is stored in a temp file to reduce in-core memory
    static String
     
    static void
    Append Base64 encoding of the data in the inStream to the specified buffer
    static void
    Append data in the omText to the specified buffer

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TextHelper

      public TextHelper()
  • Method Details

    • toString

      public static String toString(InputStream inStream) throws IOException
      Parameters:
      inStream - InputStream
      Returns:
      Base64 encoded string representint the data in inStream
      Throws:
      IOException
    • toStringBuffer

      public static void toStringBuffer(InputStream inStream, StringBuffer buffer) throws IOException
      Append Base64 encoding of the data in the inStream to the specified buffer
      Parameters:
      inStream - InputStream
      buffer - Buffer
      Throws:
      IOException
    • toStringBuffer

      public static void toStringBuffer(OMText omText, StringBuffer buffer) throws IOException
      Append data in the omText to the specified buffer
      Parameters:
      omText - the text node to get the character data from
      buffer - Buffer
      Throws:
      IOException
    • toOMText

      public static OMText toOMText(byte[] b, int off, int length, OMFactory factory, boolean isOptimize) throws IOException, javax.mail.MessagingException
      Create an OMText node from a byte array containing binary data If the byte array is large and the optimize flag is set, then the data is stored in a temp file to reduce in-core memory
      Parameters:
      b -
      off -
      length -
      factory -
      isOptimize -
      Throws:
      IOException
      javax.mail.MessagingException
    • toOMText

      public static OMText toOMText(byte[] b, int off, int length, OMFactory factory, boolean isOptimize, String attachmentDir) throws IOException, javax.mail.MessagingException
      Create an OMText node from a byte array containing binary data If the byte array is large and the optimize flag is set, then the data is stored in a temp file to reduce in-core memory
      Parameters:
      b -
      off -
      length -
      factory -
      isOptimize -
      attachmentDir -
      Throws:
      IOException
      javax.mail.MessagingException