// Path: src/main/java/com/qcloud/cos/exception/AbstractCosException.java
// public abstract class AbstractCosException extends Exception {
// 
//     private static final long serialVersionUID = 7547532865194837136L;
//     
//     private CosExceptionType type;
// 
//     public AbstractCosException(CosExceptionType type, String message) {
//         super(message);
//         this.type = type;
//     }
// 
//     public CosExceptionType getType() {
//         return type;
//     }
//     
//     @Override
//     public String toString() {
//         JSONObject responseObj = new JSONObject();
//         responseObj.put(ResponseBodyKey.CODE, type.getErrorCode());
//         responseObj.put(ResponseBodyKey.MESSAGE, getMessage());
//         return responseObj.toString();
//     }
//     
// }
// 
// Path: src/main/java/com/qcloud/cos/exception/UnknownException.java
// public class UnknownException extends AbstractCosException {
// 
//     private static final long serialVersionUID = 4303770859616883146L;
// 
//     public UnknownException(String message) {
//         super(CosExceptionType.UNKNOWN_EXCEPTION, message);
//     }
// 
// }


import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.qcloud.cos.exception.AbstractCosException;
import com.qcloud.cos.exception.UnknownException;
package com.qcloud.cos.common_utils;




public class CommonPathUtils {
	private static final Logger LOG = LoggerFactory.getLogger(CommonPathUtils.class);
	private static final String PATH_DELIMITER = "/";

// Path: src/main/java/com/qcloud/cos/exception/AbstractCosException.java
// public abstract class AbstractCosException extends Exception {
// 
//     private static final long serialVersionUID = 7547532865194837136L;
//     
//     private CosExceptionType type;
// 
//     public AbstractCosException(CosExceptionType type, String message) {
//         super(message);
//         this.type = type;
//     }
// 
//     public CosExceptionType getType() {
//         return type;
//     }
//     
//     @Override
//     public String toString() {
//         JSONObject responseObj = new JSONObject();
//         responseObj.put(ResponseBodyKey.CODE, type.getErrorCode());
//         responseObj.put(ResponseBodyKey.MESSAGE, getMessage());
//         return responseObj.toString();
//     }
//     
// }
// 
// Path: src/main/java/com/qcloud/cos/exception/UnknownException.java
// public class UnknownException extends AbstractCosException {
// 
//     private static final long serialVersionUID = 4303770859616883146L;
// 
//     public UnknownException(String message) {
//         super(CosExceptionType.UNKNOWN_EXCEPTION, message);
//     }
// 
// }


// Path: src/main/java/com/qcloud/cos/common_utils/CommonPathUtils.java
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.qcloud.cos.exception.AbstractCosException;
import com.qcloud.cos.exception.UnknownException;

package com.qcloud.cos.common_utils;




public class CommonPathUtils {
	private static final Logger LOG = LoggerFactory.getLogger(CommonPathUtils.class);
	private static final String PATH_DELIMITER = "/";

	public static String encodeRemotePath(String urlPath) throws AbstractCosException {