Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static final String URL_PROTOCOL = "http";
    public static final String PORT = "5157";
    public static String IP_ADDRESS = "192.168.1.101";

    public static String getAssetPath(String url) {
        return url.replaceFirst(getAssetsUrlPrefix(IP_ADDRESS), "");
    }

    public static String getAssetsUrlPrefix(String ipAddress) {
        return URL_PROTOCOL + "://" + ipAddress + ":" + PORT + "/assets/";
    }
}