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

io.magician.tcp.codec.impl.http.model.RequestURI Maven / Gradle / Ivy

There is a newer version: 2.0.7
Show newest version
package io.magician.tcp.codec.impl.http.model;

/**
 * 请求地址
 */
public class RequestURI {

    /**
     * 请求地址
     */
    private String uri;

    public RequestURI(String uri){
        this.uri = uri;
    }

    @Override
    public String toString() {
        return this.uri;
    }

    /**
     * 返回地址栏的参数
     * @return
     */
    public String getQuery(){
        if(this.uri.indexOf("?") < 0){
            return null;
        }
        return this.uri.substring(uri.indexOf("?") + 1);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy