⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 copymethod.java

📁 这是linux下ssl vpn的实现程序
💻 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 + -