public static boolean hasWindowsDrive(String path, boolean slashed) {
    int start = slashed ? 1 : 0;
    return path.length() >= start + 2
        && (!slashed || path.charAt(0) == '/')
        && path.charAt(start + 1) == ':'
        && ((path.charAt(start) >= 'A' && path.charAt(start) <= 'Z') || (path.charAt(start) >= 'a'
        && path.charAt(start) <= 'z'));
  }
public static boolean hasWindowsDrive ( String path , boolean slashed ) { int start = slashed ? 1 : 0 ; return path . length ( ) >= start + 2 && ( ! slashed || path . charAt ( 0 ) == '/' ) && path . charAt ( start + 1 ) == ':' && ( ( path . charAt ( start ) >= 'A' && path . charAt ( start ) <= 'Z' ) || ( path . charAt ( start ) >= 'a' && path . charAt ( start ) <= 'z' ) ) ; }
Checks if the path is a windows path. This should be platform independent.

@param path the path to check
@param slashed if the path starts with a slash
@return true if it is a windows path, false otherwise