Java URI Value Check isFtp(URI uri)

Here you can find the source of isFtp(URI uri)

Description

check if URI scheme is ftp

License

Open Source License

Parameter

Parameter Description
uri a parameter

Return

true if URL schemr is FTP

Declaration

public static boolean isFtp(URI uri) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Educational Online Test Delivery System Copyright (c) 2014 American
 * Institutes for Research//  w  w  w  .j  a v  a 2 s . c o  m
 * 
 * Distributed under the AIR Open Source License, Version 1.0 See accompanying
 * file AIR-License-1_0.txt or at http://www.smarterapp.org/documents/
 * American_Institutes_for_Research_Open_Source_Software_License.pdf
 ******************************************************************************/

import java.net.URI;

public class Main {
    /**
     * check if URI scheme is ftp
     * 
     * @param uri
     * @return true if URL schemr is FTP
     */
    public static boolean isFtp(URI uri) {
        // check if ftp
        if ("ftp".equals(uri.getScheme())) {
            return true;
        }
        return false;
    }
}

Related

  1. isFileSystemAvailable(File file, URI topLevelResource)
  2. isFileUri(String uri)
  3. isFileURI(URI uri)
  4. isFileURI(URI uri)
  5. isFileUri(URI uri)
  6. isHostDnsName(URI uri)
  7. isIRODSURIScheme(final URI irodsURI)
  8. isJar(final URI uri)
  9. isJarFile(final URI uri)