|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.googlecode.sardine.util.SardineUtil
public class SardineUtil
Basic utility code. I borrowed some code from the webdavlib for parsing dates.
Nested Class Summary | |
---|---|
static class |
SardineUtil.HttpCopy
Simple class for making copy a bit easier to deal with. |
static class |
SardineUtil.HttpMkCol
Simple class for making mkcol a bit easier to deal with. |
static class |
SardineUtil.HttpMove
Simple class for making move a bit easier to deal with. |
static class |
SardineUtil.HttpPropFind
Simple class for making propfind a bit easier to deal with. |
Constructor Summary | |
---|---|
SardineUtil()
|
Method Summary | |
---|---|
static org.apache.http.entity.StringEntity |
createDirectoryEntity()
Stupid wrapper cause it needs to be in a try/catch |
static java.lang.String |
decode(java.lang.String value)
Hides the irritating declared exception. |
static java.lang.String |
encode(java.lang.String value)
Hides the irritating declared exception. |
static Multistatus |
getMulitstatus(javax.xml.bind.Unmarshaller unmarshaller,
org.apache.http.HttpResponse response,
java.lang.String url)
Helper method for getting the Multistatus response processor. |
static org.apache.http.entity.StringEntity |
getResourcesEntity()
Stupid wrapper cause it needs to be in a try/catch |
static boolean |
isGoodResponse(int statusCode)
Is the status code 2xx |
static java.util.Date |
parseDate(java.lang.String dateValue)
Loops over all the possible date formats and tries to find the right one. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SardineUtil()
Method Detail |
---|
public static java.lang.String encode(java.lang.String value)
public static java.lang.String decode(java.lang.String value)
java.lang.RuntimeException
- if there is an UnsupportedEncodingExceptionpublic static java.util.Date parseDate(java.lang.String dateValue)
dateValue
- public static boolean isGoodResponse(int statusCode)
public static org.apache.http.entity.StringEntity getResourcesEntity()
public static org.apache.http.entity.StringEntity createDirectoryEntity()
public static Multistatus getMulitstatus(javax.xml.bind.Unmarshaller unmarshaller, org.apache.http.HttpResponse response, java.lang.String url) throws SardineException
SardineException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |