public final class UEncoder extends Object
| Constructor and Description |
|---|
UEncoder() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSafeCharacter(char c) |
String |
encodeURL(String uri)
Utility funtion to re-encode the URL.
|
void |
setEncoding(String s) |
void |
urlEncode(Writer buf,
byte[] bytes,
int off,
int len) |
void |
urlEncode(Writer buf,
String s)
URL Encode string, using a specified encoding.
|
public void setEncoding(String s)
public void addSafeCharacter(char c)
public void urlEncode(Writer buf, String s) throws IOException
s - string to be encodedenc - character encoding, for chars >%80 ( use UTF8 if not set,
as recommended in RFCs)reserved - extra characters to preserve ( "/" - if s is a URL )IOExceptionpublic void urlEncode(Writer buf, byte[] bytes, int off, int len) throws IOException
IOExceptionCopyright © 2005–2017 Oracle Corporation. All rights reserved.