All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ksyun.ks3.service.response.CopyObjectResponse Maven / Gradle / Ivy

package com.ksyun.ks3.service.response;

import com.ksyun.ks3.http.HttpHeaders;
import org.apache.http.Header;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;

import com.ksyun.ks3.dto.CopyResult;
import com.ksyun.ks3.utils.DateUtils;

/**
 * @author lijunwei[[email protected]]  
 * 
 * @date 2014年11月17日 下午1:02:11
 * 
 * @description 
 **/
public class CopyObjectResponse extends Ks3WebServiceXmlResponse{

	public int[] expectedStatus() {
		return new int[]{200};
	}

	@Override
	public void preHandle() {
	}

	@Override
	public void startDocument() throws SAXException {
		result = new CopyResult();
	}

	@Override
	public void startEle(String uri, String localName, String qName,
			Attributes attributes) throws SAXException {
		
	}

	@Override
	public void endEle(String uri, String localName, String qName)
			throws SAXException {
		
	}

	@Override
	public void string(String s) {
		if("LastModified".equals(getTag())){
			result.setLastModified(DateUtils.convertStr2Date(s));
		}else if("ETag".equals(getTag())){
			result.setETag(s.replace("\"", ""));
		}
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy