Here you can find the source of normalizePath(final String in)
public static String normalizePath(final String in)
//package com.java2s; //License from project: LGPL public class Main { public static String normalizePath(final String in) { String out = in;//from w w w .java2s . c o m if (in.endsWith("/")) { out = in.substring(0, in.length() - 1); } return out.replace("\\", "/"); } }