*/
private void setDavResource(WebdavResource resource) throws Exception
{
redirectionResolved = false;
final URLFileName name = (URLFileName) getName();
if (resource == null)
{
// HttpURL url = new HttpURL(name.getHostName(), name.getPort(), name.getPath());
String pathEncoded = name.getPathQueryEncoded(urlCharset);
HttpURL url = new HttpURL(name.getUserName(), name.getPassword(), name.getHostName(), name.getPort());
url.setEscapedPath(pathEncoded);
resource = new WebdavResource(fileSystem.getClient())
{
};
resource.setHttpURL(url, WebdavResource.NOACTION, 1);
}
this.resource = resource;
// if (bCheckExists)
{
/* now fill the dav properties */
String pathEncoded = name.getPathQueryEncoded(urlCharset);
final OptionsMethod optionsMethod = new OptionsMethod(pathEncoded);
try
{
optionsMethod.setFollowRedirects(true);
final int status = fileSystem.getClient().executeMethod(optionsMethod);