public void delete(String name, Boolean flag) throws UpYunExcetion {
        try {
            StringBuffer url = new StringBuffer();
            for (String str : name.split("/")) {
                if (str == null || str.length() == 0) {
                    continue;
                }
                url.append(UrlCodingUtil.encodeBase64(str.getBytes("utf-8")) + "/");
            }
            if (flag) {
                url = url.delete(url.length() - 1, url.length());
            }
            sign.setUri(url.toString());
        } catch (UnsupportedEncodingException e) {
            LogUtil.exception(logger, e);
        }
        sign.setContentLength(0);
        sign.setMethod(HttpMethod.DELETE.name());
        String url = autoUrl + sign.getUri();
        Map<String, String> headers = sign.getHeaders();

        HttpResponse httpResponse = HttpClientUtils.deleteByHttp(url, headers);
        if (httpResponse.getStatusLine().getStatusCode() != 200) {
            throw new UpYunExcetion(httpResponse.getStatusLine().getStatusCode(), httpResponse.getStatusLine()
                .getReasonPhrase());
        }
    }