|
| Services |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
java.lang.Object | +--com.sas.services.webdav.Utils
A convenience class to bring together a number of utilties.
| Constructor Summary | |
Utils()
|
|
| Method Summary | |
static String |
addSegment(String path,
String segment)
Append a segment to a path. |
static String |
bytesToHex(byte[] chars)
Convert a byte array to a hex representation that is easy to visualise. |
static String |
byteStreamToHex(InputStream byteStream)
Convert a stream of bytes to hex. |
static String |
CDATA(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 String |
getRelativePath(String urlString)
Get the relative path for a given url. |
static String |
intToHex(int number,
int width)
Convert an int to printable hex format (eg 33 = x'21') padding if necessary. |
static boolean |
isCollection(Map properties)
A utility method to check through a set of properties and determine if it is a collection or not. |
static boolean |
isSameUrl(String url1,
String url2)
Compare two url strings. |
static String |
stringToHex(String chars)
Convert a set of characters to hex. |
static String |
stripLeadingSlashes(String buffer)
Strip off leading forward slash characters |
static String |
XMLESCAPE(String text)
Escape the three characters "<", "&", ">", which cannot appear in literal form except as markup (unless they are in a CDATA section). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Utils()
| Method Detail |
public static String bytesToHex(byte[] chars)
chars - The byte array to convert to hex displaypublic static String byteStreamToHex(InputStream byteStream)
byteStream - A stream containing the bytes to convertpublic static String stringToHex(String chars)
chars - A string containing the characters to convert
public static String intToHex(int number,
int width)
number - The number to be convertedwidth - The width of the resulting string
public static boolean isSameUrl(String url1,
String url2)
url1 - The first url stringurl2 - The second url stringpublic static boolean isCollection(Map properties)
properties - The property map for this resource.public static PropertyMap convertPropertyArray(org.apache.webdav.lib.Property[] props)
props - An array of Property objectspublic static String getRelativePath(String urlString)
urlString - A string representing a url
public static String addSegment(String path,
String segment)
path - The path (or url)segment - The segment to be added to the pathpublic static String CDATA(String text)
text - The text to be encapsulatedpublic static String XMLESCAPE(String text)
text - The text to be escapedpublic static String stripLeadingSlashes(String buffer)
buffer - Initial string from which to remove leading slashes
|
| Services |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||