📄 copymethod.java
字号:
package com.maverick.http;
import java.io.IOException;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2005</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class CopyMethod extends HttpMethod {
String toURI;
boolean overwrite = false;
public CopyMethod(String uri, String toURI, boolean overwrite) {
this("COPY", uri, toURI, overwrite);
}
CopyMethod(String name, String uri, String toURI, boolean overwrite) {
super(name, uri);
this.toURI = toURI;
this.overwrite = overwrite;
}
public HttpResponse execute(HttpRequest request, HttpConnection con) throws IOException {
request.setHeaderField("Destination", toURI);
request.setHeaderField("Overwrite", overwrite ? "T" : "F");
return super.execute(request, con);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -