Top Description Fields Constructors Methods
org.snakeyaml.engine.v2.common

public abstract Class UriEncoder

extends Object
Class Inheritance
Imports
java.io.UnsupportedEncodingException, java.net.URLDecoder, java.nio.ByteBuffer, .CharBuffer, java.nio.charset.CharacterCodingException, .CharsetDecoder, .CodingErrorAction, .StandardCharsets, org.snakeyaml.engine.external.com.google.gdata.util.common.base.Escaper, .PercentEscaper, org.snakeyaml.engine.v2.exceptions.YamlEngineException

To be decided

Field Summary

Modifier and TypeField and Description
private static final Escaper
private static final String
private static final CharsetDecoder

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

decoded data
decode
(ByteBuffer
data to decode
buff
)

Decode '%'-escaped characters.

public static String

Returns:

decoded with UTF-8
decode
(String
- the source
buff
)

Decode with URLDecoder

public static String

Returns:

encoded URI
encode
(String
URI to be escaped
uri
)

Escape special characters with '%'

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

escaperback to summary
private static final Escaper escaper
SAFE_CHARSback to summary
private static final String SAFE_CHARS
UTF8Decoderback to summary
private static final CharsetDecoder UTF8Decoder

Constructor Detail

UriEncoderback to summary
private UriEncoder()

Method Detail

decodeback to summary
public static String decode(ByteBuffer buff) throws CharacterCodingException

Decode '%'-escaped characters. Decoding fails in case of invalid UTF-8

Parameters
buff:ByteBuffer

data to decode

Returns:String

decoded data

Exceptions
CharacterCodingException:
if cannot be decoded
decodeback to summary
public static String decode(String buff)

Decode with URLDecoder

Parameters
buff:String

- the source

Returns:String

decoded with UTF-8

encodeback to summary
public static String encode(String uri)

Escape special characters with '%'

Parameters
uri:String

URI to be escaped

Returns:String

encoded URI