com.googlecode.sardine.util
Class SardineUtil

java.lang.Object
  extended by com.googlecode.sardine.util.SardineUtil

public class SardineUtil
extends java.lang.Object

Basic utility code. I borrowed some code from the webdavlib for parsing dates.

Author:
jonstevens

Nested Class Summary
static class SardineUtil.HttpPropFind
          Simple class for making propfind a bit easier to deal with.
 
Constructor Summary
SardineUtil()
           
 
Method Summary
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 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

SardineUtil

public SardineUtil()
Method Detail

encode

public static java.lang.String encode(java.lang.String value)
Hides the irritating declared exception.


decode

public static java.lang.String decode(java.lang.String value)
Hides the irritating declared exception.

Returns:
null if there is an IllegalArgumentException
Throws:
java.lang.RuntimeException - if there is an UnsupportedEncodingException

parseDate

public static java.util.Date parseDate(java.lang.String dateValue)
Loops over all the possible date formats and tries to find the right one.

Parameters:
dateValue -

isGoodResponse

public static boolean isGoodResponse(int statusCode)
Is the status code 2xx


getResourcesEntity

public static org.apache.http.entity.StringEntity getResourcesEntity()
Stupid wrapper cause it needs to be in a try/catch



Copyright © 2010 Jon Stevens and a gang of smelly fish. All Rights Reserved. Build version: 25