StringMessageUtils (Mule ESB 2.2.1 API)
Keywords: org.mule.util.StringMessageUtils class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.util
Class StringMessageUtils

    java.lang.Object
      org.mule.util.StringMessageUtils

    public final class StringMessageUtils

extends Object

Useful methods for formatting message strings for logging or exceptions.

Field Summary
`static int` | `DEFAULT_MESSAGE_WIDTH`
`static int` | `MAX_ELEMENTS`

Method Summary
`static String` | `getBoilerPlate(List messages, char c, int maxlength)`
`static String` | `getBoilerPlate(String message)`
`static String` | `getBoilerPlate(String message, char c, int maxlength)`
`static byte[]` | `getBytes(String string)`
`static String` | `getFormattedMessage(String msg, Object[] arguments)`
`static String` | `getString(byte[] bytes, String encoding)`
`static String` | `headersToString(MuleMessage m)`
`static String` | `toString(Object o)`
`static String` | `truncate(String message, int length, boolean includeCount)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### MAX_ELEMENTS

    public static final int MAX_ELEMENTS

See Also:
  Constant Field Values

### DEFAULT_MESSAGE_WIDTH

    public static final int DEFAULT_MESSAGE_WIDTH

See Also:
  Constant Field Values

Method Detail

### getFormattedMessage

    public static String getFormattedMessage(String msg,
                                             Object[] arguments)

### getBoilerPlate

    public static String getBoilerPlate(String message)

### getBoilerPlate

    public static String getBoilerPlate(String message,
                                        char c,
                                        int maxlength)

### getBoilerPlate

    public static String getBoilerPlate(List messages,
                                        char c,
                                        int maxlength)

### truncate

    public static String truncate(String message,
                                  int length,
                                  boolean includeCount)

### getBytes

    public static byte[] getBytes(String string)

### getString

    public static String getString(byte[] bytes,
                                   String encoding)

### toString

    public static String toString(Object o)

  See Also:
    `ArrayUtils#toString(Object, int)}`, `CollectionUtils#toString(Collection, int)}`, `MapUtils#toString(Map, boolean)}`

### headersToString

    public static String headersToString(MuleMessage m)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.