Top Fields Constructors Methods
org.yaml.snakeyaml.util

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.yaml.snakeyaml.error.YAMLException, org.yaml.snakeyaml.external.com.google.gdata.util.common.base.Escaper, .PercentEscaper

Field Summary

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

Constructor Summary

AccessConstructor and Description
public

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
decode(String buff)

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
public 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)
encodeback to summary
public static String encode(String uri)

Escape special characters with '%'

Parameters
uri:String

URI to be escaped

Returns:String

encoded URI