org.apache.jmeter.protocol.http.util

## Class EncoderCache

- java.lang.Object
- - org.apache.jmeter.protocol.http.util.EncoderCache

-     public class EncoderCache
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `URL_ARGUMENT_ENCODING` The encoding which should be usd for URLs, according to HTTP specification

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EncoderCache(int cacheSize)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getEncoded(java.lang.String k)` Get the specified value URL encoded using UTF-8 encoding
    `java.lang.String` | `getEncoded(java.lang.String k, java.lang.String contentEncoding)` Get the specified value URL encoded using the specified encoding

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### URL_ARGUMENT_ENCODING

          public static final java.lang.String URL_ARGUMENT_ENCODING

      The encoding which should be usd for URLs, according to HTTP specification

  - ### Constructor Detail

    - #### EncoderCache

          public EncoderCache(int cacheSize)

  - ### Method Detail

    - #### getEncoded

          public java.lang.String getEncoded(java.lang.String k)

      Get the specified value URL encoded using UTF-8 encoding
      Parameters:
        `k` - the value to encode
      Returns:
        the value URL encoded using UTF-8

    - #### getEncoded

          public java.lang.String getEncoded(java.lang.String k,
                                             java.lang.String contentEncoding)
                                      throws java.io.UnsupportedEncodingException

      Get the specified value URL encoded using the specified encoding
      Parameters:
        `k` - the value to encode
        `contentEncoding` - the encoding to use when URL encoding
      Returns:
        the value URL encoded using the specified encoding
      Throws:
        `java.io.UnsupportedEncodingException` - if the specified encoding is not supported

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