1 23 24 package org.apache.webdav.lib.methods; 25 26 import java.io.IOException ; 27 import java.io.InputStream ; 28 import org.apache.commons.httpclient.HttpConnection; 29 import org.apache.commons.httpclient.HttpException; 30 import org.apache.commons.httpclient.HttpState; 31 import org.apache.webdav.lib.util.WebdavStatus; 32 33 67 public class DeleteMethod 68 extends XMLResponseMethodBase { 69 70 71 73 74 77 public DeleteMethod() { 78 } 79 80 81 84 public DeleteMethod(String path) { 85 super(path); 86 } 87 88 93 public void parseResponse(InputStream input, HttpState state, HttpConnection conn) 94 throws IOException , HttpException { 95 try 96 { 97 int code = getStatusLine().getStatusCode(); 98 if (code == WebdavStatus.SC_CONFLICT || 99 code == WebdavStatus.SC_MULTI_STATUS || 100 code == WebdavStatus.SC_FORBIDDEN ) { 101 parseXMLResponse(input); 102 } 103 } 104 catch (IOException e) { 105 } 107 } 108 109 public String getName() { 110 return "DELETE"; 111 } 112 113 115 } 116 | Popular Tags |