Java Path Is Absolute isAbsolute(final String path)

Here you can find the source of isAbsolute(final String path)

Description

is Absolute

License

Open Source License

Declaration

private static boolean isAbsolute(final String path) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2015-2016 Oak Ridge National Laboratory.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/

public class Main {
    private static boolean isAbsolute(final String path) {
        return path.startsWith("/") || isURL(path);
    }/* w w  w. j a v a2 s  .co  m*/

    private static boolean isURL(final String path) {
        return path.startsWith("http://") || path.startsWith("https://");
    }
}

Related

  1. isAbsolute(String aPath)
  2. isAbsolute(String path)
  3. isAbsolute(String path)
  4. isAbsolute(String path)