com.atlassian.confluence.util
Class CompleteURLEncoder

java.lang.Object
  extended by com.atlassian.confluence.util.CompleteURLEncoder

public class CompleteURLEncoder
extends java.lang.Object

This class caters for encoding of url strings for the following protocols: - file - http (see RFC 2396 for reference)

The url strings passed in are converted into Java URI objects as it automatically does the encoding. Note we cannot simply use Java's URLEncoder as it is only for HTML form encoding and does not cater for the entire url.


Field Summary
static java.lang.String FILE_PROTOCOL
           
static org.apache.log4j.Logger log
          Deprecated. Since 3.1, use private logger
 
Constructor Summary
CompleteURLEncoder()
           
 
Method Summary
static java.lang.String encode(java.lang.String urlString, java.lang.String enc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

@Deprecated
public static final org.apache.log4j.Logger log
Deprecated. Since 3.1, use private logger

FILE_PROTOCOL

public static final java.lang.String FILE_PROTOCOL
See Also:
Constant Field Values
Constructor Detail

CompleteURLEncoder

public CompleteURLEncoder()
Method Detail

encode

public static java.lang.String encode(java.lang.String urlString,
                                      java.lang.String enc)
                               throws java.net.MalformedURLException,
                                      java.io.UnsupportedEncodingException
Throws:
java.net.MalformedURLException
java.io.UnsupportedEncodingException


Copyright © 2003-2014 Atlassian. All Rights Reserved.