com.softwareag.tamino.db.api.invocation.http
Class TURLPathEncoder

java.lang.Object
  extended by com.softwareag.tamino.db.api.invocation.http.TURLPathEncoder

public class TURLPathEncoder
extends java.lang.Object

TURLPathEncoder defines how to encode a URL path so that it fullfills the specification given by RFC 2396. According to this only ASCII characters can be used, others that do not conform to this have to be encoded in the form %xx where xx represents the hex code for the specific character. Class is implemented due to singleton design pattern.

Version:
$Revision: 1.4 $
Author:
Marcus Schreyer

Constructor Summary
protected TURLPathEncoder()
          Default Constructor.
 
Method Summary
 java.lang.String encode(java.lang.String path)
          Encodes the given path so that it only contains ASCII characters.
static TURLPathEncoder getInstance()
          Gets the singleton instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TURLPathEncoder

protected TURLPathEncoder()
Default Constructor.

Method Detail

getInstance

public static TURLPathEncoder getInstance()
Gets the singleton instance.


encode

public java.lang.String encode(java.lang.String path)
Encodes the given path so that it only contains ASCII characters. Characters outside of ASCII are encoded to the form %xx with xx as the hex representation. Special characters namely "<" ">" "#" and "%" are encoded in the form %xx as well. Please note that for characters outside the ASCII range only the lower 8 bits are taken.



Copyright (c) 2013 Software AG. All Rights Reserved.