question: private static String convertFromWindowsPath ( String path ) { int colon = path . indexOf ( ':' ) ; int length = path . length ( ) ; char ch ; if ( colon == 1 && ( ch = path . charAt ( 0 ) ) != '/' && ch != '\\' ) return "/" + path . charAt ( 0 ) + ":/" + path . substring ( 2 ) ; else if ( length > 1 && ( ( ch = path . charAt ( 0 ) ) == '/' || ch == '\\' ) && ( ( ch = path . charAt ( 1 ) ) == '/' || ch == '\\' ) ) { if ( colon < 0 ) return "/:" + path ; for ( int i = colon - 2 ; i > 1 ; i -- ) { if ( ( ch = path . charAt ( i ) ) != '/' && ch != '\\' ) return "/:" + path ; } ch = path . charAt ( colon - 1 ) ; if ( ch >= 'a' && ch <= 'z' || ch >= 'A' && ch <= 'Z' ) return path . substring ( colon - 2 ) ; else return "/:" + path ; } else return path ; }
target:  a:xxx -> /a:xxx ///a:xxx -> /a:xxx //xxx -> /:/xxx