public final class UEncoder extends Object
Constructor and Description |
---|
UEncoder() |
Modifier and Type | Method and Description |
---|---|
void |
addSafeCharacter(char c) |
String |
encodeURL(String url)
Utility funtion to re-encode the URL.
|
String |
encodeURL(String uri,
boolean toHexUpperCase)
Utility function to re-encode the URL.
|
void |
setEncoding(String s) |
void |
urlEncode(Writer buf,
byte[] bytes,
int off,
int len) |
void |
urlEncode(Writer buf,
byte[] bytes,
int off,
int len,
boolean toHexUpperCase) |
void |
urlEncode(Writer buf,
String s)
URL Encode string, using a specified encoding.
|
void |
urlEncode(Writer buf,
String s,
boolean toHexUpperCase)
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
buf
- the Writer
to write the encoded result to.s
- the String to encode.IOException
public void urlEncode(Writer buf, String s, boolean toHexUpperCase) throws IOException
buf
- the Writer
to write the encoded result to.s
- the String to encode.toHexUpperCase
- the hex string will be in upper caseIOException
public void urlEncode(Writer buf, byte[] bytes, int off, int len) throws IOException
IOException
public void urlEncode(Writer buf, byte[] bytes, int off, int len, boolean toHexUpperCase) throws IOException
IOException
public String encodeURL(String url)
url
- Copyright © 2014 Oracle Corporation. All rights reserved.