|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.webdav.Utils
public class Utils
A convenience class to bring together a number of utilties.
Constructor Summary | |
---|---|
Utils()
|
Method Summary | |
---|---|
static java.lang.String |
addSegment(java.lang.String path,
java.lang.String segment)
Append a segment to a path. |
static java.lang.String |
bytesToHex(byte[] chars)
Convert a byte array to a hex representation that is easy to visualise. |
static java.lang.String |
byteStreamToHex(java.io.InputStream byteStream)
Convert a stream of bytes to hex. |
static java.lang.String |
CDATA(java.lang.String text)
Encapsulate the text in a CDATA section in case there is any markup in text. |
static PropertyMap |
convertPropertyArray(org.apache.webdav.lib.Property[] props)
A utility method to convert an array of WebDAV Property objects to a property map. |
static java.lang.String |
getRelativePath(java.lang.String urlString)
Get the relative path for a given url. |
static java.lang.String |
intToHex(int number,
int width)
Convert an int to printable hex format (eg 33 = x'21') padding if necessary. |
static boolean |
isCollection(java.util.Map properties)
A utility method to check through a set of properties and determine if it is a collection or not. |
static boolean |
isSameUrl(java.lang.String url1,
java.lang.String url2)
Compare two url strings. |
static void |
print(java.lang.String a)
|
static java.lang.String |
stringToHex(java.lang.String chars)
Convert a set of characters to hex. |
static java.lang.String |
stripLeadingSlashes(java.lang.String buffer)
Strip off leading forward slash characters |
static java.lang.String |
URIDecode(java.lang.String uriString)
Decodes a URI and produces a Java string user version of the URI. |
static java.lang.String |
URIDecode(java.lang.String uriString,
boolean forcePort)
Decodes a URI and produces a Java string user version of the URI. |
static java.lang.String |
XMLESCAPE(java.lang.String text)
Escape the characters '<', '&', '>' and '"', which shouldn't appear in literal form except as markup (unless they are in a CDATA section). |
Constructor Detail |
---|
public Utils()
Method Detail |
---|
public static java.lang.String bytesToHex(byte[] chars)
chars
- The byte array to convert to hex display
public static java.lang.String byteStreamToHex(java.io.InputStream byteStream)
byteStream
- A stream containing the bytes to convert
public static java.lang.String stringToHex(java.lang.String chars)
chars
- A string containing the characters to convert
public static java.lang.String intToHex(int number, int width)
number
- The number to be convertedwidth
- The width of the resulting string
public static boolean isSameUrl(java.lang.String url1, java.lang.String url2)
url1
- The first url stringurl2
- The second url string
public static boolean isCollection(java.util.Map properties)
properties
- The property map for this resource.
public static PropertyMap convertPropertyArray(org.apache.webdav.lib.Property[] props)
props
- An array of Property objects
public static java.lang.String getRelativePath(java.lang.String urlString)
urlString
- A string representing a url
public static java.lang.String addSegment(java.lang.String path, java.lang.String segment)
path
- The path (or url)segment
- The segment to be added to the path
public static java.lang.String CDATA(java.lang.String text)
text
- The text to be encapsulated
public static java.lang.String XMLESCAPE(java.lang.String text)
text
- The text to be escaped
public static java.lang.String stripLeadingSlashes(java.lang.String buffer)
buffer
- Initial string from which to remove leading slashes
public static void print(java.lang.String a)
public static java.lang.String URIDecode(java.lang.String uriString)
uriString
- The actual URI (absolute or relative)
public static java.lang.String URIDecode(java.lang.String uriString, boolean forcePort)
uriString
- The actual URI (absolute or relative)
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |