Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.net.URLDecoder;

public class Main {

    private final static String parseObjKey(String path, String url_type) {
        path = URLDecoder.decode(path);
        String objKey = "";
        int p = 0;
        String str = "";
        String[] tmp = null;
        p = path.indexOf(url_type) + url_type.length();
        str = path.substring(p);
        if (str.contains("?")) {
            tmp = str.split("?");
            objKey = tmp[0];
        } else {
            objKey = str;
        }
        return objKey;
    }
}