org.apache.jetspeed.util
Class URIEncoder
java.lang.Object
org.apache.jetspeed.util.URIEncoder
- public class URIEncoder
- extends java.lang.Object
Take a URI and encode it so that it can be stored on all filesystems and HTTP
values
- Version:
- $Id: URIEncoder.java,v 1.11 2004/02/23 03:23:42 jford Exp $
- Author:
- Kevin A. Burton, Santiago Gala
Method Summary |
static java.lang.String |
decode(java.lang.String uri)
Decode the given URI. |
static java.lang.String |
encode(java.lang.String uri)
Encode the given URI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INVALID_CHARACTERS
public static final java.lang.String[] INVALID_CHARACTERS
- A list of invalid characters that can't exist within filenames. If they
appear then the DiskCache will escape them. The current list is in part
based on Microsoft Knowledge Base article Q177506 (because DOS filesystems
are more generally limited than UNIX filesystems).
SGP: Windows NT refuses to take "?", so I add it to the list.
Additionally, if we encode "?", the jdk runtime logic decodes it twice
for "file:" urls, giving a filename with a space in it. I have fixed
it in JetspeedDiskCacheEntry.java, avoiding the creation of a new URL when
getFile() is not null.
CODED_CHARACTERS
public static final java.lang.String[] CODED_CHARACTERS
URIEncoder
public URIEncoder()
encode
public static java.lang.String encode(java.lang.String uri)
- Encode the given URI
decode
public static java.lang.String decode(java.lang.String uri)
- Decode the given URI.
Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.