/**
* 时 代 J a v a - nowjava.com 提 供
**/
//Licensed under the Apache License, Version 2.0 (the "License");
//package com.nowjava;
public class Main {
public static void main(String[] argv) throws Exception {
String resource = "nowjava.com";
System.out.println(isSupported(resource));
}
/**
* The suffixes of the files to support.
*/
public static final String[] SUPPORTED_FILES = new String[] { ".zip",
".jar", ".war" };
/**
* Returns true if the given {@code resource} is either a zip, jar or war file.
*/
public static boolean isSupported(String resource) {
int idx = resource.lastIndexOf('.');
if (resource.length() == idx + 4) {
for (int i = 0; i < SUPPORTED_FILES.length; i++) {
/**代码未完, 请加载全部代码(NowJava.com).**/
本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。