Home > Contents > Index > 
Expanded TOC | Accordion TOC | Annotated TOC | Index 
Utilities.deBabble
Replaces the character encoding strings--%20 (space), %22 ("), %12 ( ), %3c (<), %3e (>), and %26 (&)--in an input string with the characters they represent.
Syntax
static final String deBabble(String str)Parameters
str- String to convert.
Description
Certain reserved characters (such as <) can be encoded into their hexadecimal equivalents (for example,
%3c). ThedeBabblemethod replaces these hexadecimal equivalents with the actual character name; for example,deBabbleconverts%3cback into the less-than sign (<). ThedeBabblemethod can convert the following hexadecimal values:
%20%22")%25%)%26&)%0a)%09%0d)%3c<)
Returns
Returns the converted string, or the same string if no conversion was done.
Example
The following fragment converts a string containing some embedded hexadecimal characters:
String AStringContainingHex = "apples%26bananas%3coranges"; String deBabbledStr = Utilities.deBabble(AStringContainingHex);After executing the preceding code, the
deBabbledStrobject should contain the following:
apples&bananas<oranges
Home > Contents > Index > 
Oracle JAVA Reference
Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.