Apache JMeter

## org.apache.jmeter.save.converters
Class ConversionHelp

    java.lang.Object
      org.apache.jmeter.save.converters.ConversionHelp

    public class ConversionHelp

extends Object

Utility conversion routines for use with XStream

Field Summary
`static String` `ATT_CLASS`
`static String` `ATT_ELEMENT_TYPE`
`static String` `ATT_NAME`

Constructor Summary
`ConversionHelp()`

Method Summary
`static String` `cdata(byte[] chars, String encoding)`
`static String` `decode(String p)`
`static String` `encode(String p)` Encode a string (if necessary) for output to a JTL file.
`static boolean` `isSpecialProperty(String name)`
`static void` `restoreSpecialProperties(TestElement testElement, com.thoughtworks.xstream.io.HierarchicalStreamReader reader)` Restore the special properties: TestElement.GUI_CLASS TestElement.TEST_CLASS TestElement.NAME TestElement.ENABLED
`static void` `saveSpecialProperties(TestElement testElement, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer)` Save the special properties: TestElement.GUI_CLASS TestElement.TEST_CLASS TestElement.NAME TestElement.ENABLED
`static void` `setInVersion(String v)`
`static void` `setOutVersion(String v)`

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

Field Detail

### ATT_CLASS

    public static final String ATT_CLASS

See Also:
  Constant Field Values

### ATT_NAME

    public static final String ATT_NAME

See Also:
  Constant Field Values

### ATT_ELEMENT_TYPE

    public static final String ATT_ELEMENT_TYPE

See Also:
  Constant Field Values

Constructor Detail

### ConversionHelp

    public ConversionHelp()

Method Detail

### setInVersion

    public static void setInVersion(String v)

### setOutVersion

    public static void setOutVersion(String v)

### encode

    public static String encode(String p)

  Encode a string (if necessary) for output to a JTL file. Strings are only encoded if the output version is 1.0, but nulls are always converted to the empty string.

  Parameters:
    `p` - string to encode
  Returns:
    encoded string (will never be null)

### decode

    public static String decode(String p)

### cdata

    public static String cdata(byte[] chars,
                               String encoding)
                        throws UnsupportedEncodingException

  Throws:
    `UnsupportedEncodingException`

### isSpecialProperty

    public static boolean isSpecialProperty(String name)

### saveSpecialProperties

    public static void saveSpecialProperties(TestElement testElement,
                                             com.thoughtworks.xstream.io.HierarchicalStreamWriter writer)

  Save the special properties:
  - TestElement.GUI_CLASS
  - TestElement.TEST_CLASS
  - TestElement.NAME
  - TestElement.ENABLED

  Parameters:
    `testElement` -
    `writer` -

### restoreSpecialProperties

    public static void restoreSpecialProperties(TestElement testElement,
                                                com.thoughtworks.xstream.io.HierarchicalStreamReader reader)

  Restore the special properties:
  - TestElement.GUI_CLASS
  - TestElement.TEST_CLASS
  - TestElement.NAME
  - TestElement.ENABLED

  Parameters:
    `testElement` -
    `reader` -

Apache JMeter

Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.