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 34 53 public class CheckoutMethod 54 extends XMLResponseMethodBase { 55 56 57 59 60 61 63 64 65 67 68 71 public CheckoutMethod() { 72 } 73 74 75 78 public CheckoutMethod(String path) { 79 super(path); 80 } 81 82 87 public void parseResponse(InputStream input, HttpState state, HttpConnection conn) 88 throws IOException , HttpException { 89 try 90 { 91 if (getStatusLine().getStatusCode() == WebdavStatus.SC_CONFLICT || 92 getStatusLine().getStatusCode() == WebdavStatus.SC_FORBIDDEN ) { 93 parseXMLResponse(input); 94 } 95 } 96 catch (IOException e) { 97 } 99 } 100 101 public String getName() { 102 return "CHECKOUT"; 103 } 104 } 105 | Popular Tags |