亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? resources.java

?? 數據庫連接池源碼
?? JAVA
字號:
package llm.pool.relation.mydatasource;

import java.io.*;
import java.net.URL;
import java.net.URLConnection;
import java.util.Properties;

/**
 * A class to simplify access to resources through the classloader.
 */
public class Resources extends Object {

  private static ClassLoader defaultClassLoader;

  private Resources() {
  }

  /**
   * Returns the default classloader (may be null).
   *
   * @return The default classloader
   */
  public static ClassLoader getDefaultClassLoader() {
    return defaultClassLoader;
  }

  /**
   * Sets the default classloader
   *
   * @param defaultClassLoader - the new default ClassLoader
   */
  public static void setDefaultClassLoader(ClassLoader defaultClassLoader) {
    Resources.defaultClassLoader = defaultClassLoader;
  }

  /**
   * Returns the URL of the resource on the classpath
   *
   * @param resource The resource to find
   * @return The resource
   * @throws IOException If the resource cannot be found or read
   */
  public static URL getResourceURL(String resource) throws IOException {
    return getResourceURL(getClassLoader(), resource);
  }

  /**
   * Returns the URL of the resource on the classpath
   *
   * @param loader   The classloader used to load the resource
   * @param resource The resource to find
   * @return The resource
   * @throws IOException If the resource cannot be found or read
   */
  public static URL getResourceURL(ClassLoader loader, String resource) throws IOException {
    URL url = null;
    if (loader != null) url = loader.getResource(resource);
    if (url == null) url = ClassLoader.getSystemResource(resource);
    if (url == null) throw new IOException("Could not find resource " + resource);
    return url;
  }

  /**
   * Returns a resource on the classpath as a Stream object
   *
   * @param resource The resource to find
   * @return The resource
   * @throws IOException If the resource cannot be found or read
   */
  public static InputStream getResourceAsStream(String resource) throws IOException {
    return getResourceAsStream(getClassLoader(), resource);
  }

  /**
   * Returns a resource on the classpath as a Stream object
   *
   * @param loader   The classloader used to load the resource
   * @param resource The resource to find
   * @return The resource
   * @throws IOException If the resource cannot be found or read
   */
  public static InputStream getResourceAsStream(ClassLoader loader, String resource) throws IOException {
    InputStream in = null;
    if (loader != null) in = loader.getResourceAsStream(resource);
    if (in == null) in = ClassLoader.getSystemResourceAsStream(resource);
    if (in == null) throw new IOException("Could not find resource " + resource);
    return in;
  }

  /**
   * Returns a resource on the classpath as a Properties object
   *
   * @param resource The resource to find
   * @return The resource
   * @throws IOException If the resource cannot be found or read
   */
  public static Properties getResourceAsProperties(String resource)
      throws IOException {
    Properties props = new Properties();
    InputStream in = null;
    String propfile = resource;
    in = getResourceAsStream(propfile);
    props.load(in);
    in.close();
    return props;
  }

  /**
   * Returns a resource on the classpath as a Properties object
   *
   * @param loader   The classloader used to load the resource
   * @param resource The resource to find
   * @return The resource
   * @throws IOException If the resource cannot be found or read
   */
  public static Properties getResourceAsProperties(ClassLoader loader, String resource)
      throws IOException {
    Properties props = new Properties();
    InputStream in = null;
    String propfile = resource;
    in = getResourceAsStream(loader, propfile);
    props.load(in);
    in.close();
    return props;
  }

  /**
   * Returns a resource on the classpath as a Reader object
   *
   * @param resource The resource to find
   * @return The resource
   * @throws IOException If the resource cannot be found or read
   */
  public static Reader getResourceAsReader(String resource) throws IOException {
    return new InputStreamReader(getResourceAsStream(resource));
  }

  /**
   * Returns a resource on the classpath as a Reader object
   *
   * @param loader   The classloader used to load the resource
   * @param resource The resource to find
   * @return The resource
   * @throws IOException If the resource cannot be found or read
   */
  public static Reader getResourceAsReader(ClassLoader loader, String resource) throws IOException {
    return new InputStreamReader(getResourceAsStream(loader, resource));
  }

  /**
   * Returns a resource on the classpath as a File object
   *
   * @param resource The resource to find
   * @return The resource
   * @throws IOException If the resource cannot be found or read
   */
  public static File getResourceAsFile(String resource) throws IOException {
    return new File(getResourceURL(resource).getFile());
  }

  /**
   * Returns a resource on the classpath as a File object
   *
   * @param loader   - the classloader used to load the resource
   * @param resource - the resource to find
   * @return The resource
   * @throws IOException If the resource cannot be found or read
   */
  public static File getResourceAsFile(ClassLoader loader, String resource) throws IOException {
    return new File(getResourceURL(loader, resource).getFile());
  }

  /**
   * Gets a URL as an input stream
   *
   * @param urlString - the URL to get
   * @return An input stream with the data from the URL
   * @throws IOException If the resource cannot be found or read
   */
  public static InputStream getUrlAsStream(String urlString) throws IOException {
    URL url = new URL(urlString);
    URLConnection conn = url.openConnection();
    return conn.getInputStream();
  }

  /**
   * Gets a URL as a Reader
   *
   * @param urlString - the URL to get
   * @return A Reader with the data from the URL
   * @throws IOException If the resource cannot be found or read
   */
  public static Reader getUrlAsReader(String urlString) throws IOException {
    return new InputStreamReader(getUrlAsStream(urlString));
  }

  /**
   * Gets a URL as a Properties object
   *
   * @param urlString - the URL to get
   * @return A Properties object with the data from the URL
   * @throws IOException If the resource cannot be found or read
   */
  public static Properties getUrlAsProperties(String urlString) throws IOException {
    Properties props = new Properties();
    InputStream in = null;
    String propfile = urlString;
    in = getUrlAsStream(propfile);
    props.load(in);
    in.close();
    return props;
  }

  /**
   * Loads a class
   *
   * @param className - the class to load
   * @return The loaded class
   * @throws ClassNotFoundException If the class cannot be found (duh!)
   */
  public static Class classForName(String className) throws ClassNotFoundException {
    Class clazz = null;
    try {
      clazz = getClassLoader().loadClass(className);
    } catch (Exception e) {
      // Ignore.  Failsafe below.
    }
    if (clazz == null) {
      clazz = Class.forName(className);
    }
    return clazz;
  }

  /**
   * Creates an instance of a class
   *
   * @param className - the class to create
   * @return An instance of the class
   * @throws ClassNotFoundException If the class cannot be found (duh!)
   * @throws InstantiationException If the class cannot be instantiaed
   * @throws IllegalAccessException If the class is not public, or other access problems arise
   */
  public static Object instantiate(String className)
      throws ClassNotFoundException, InstantiationException, IllegalAccessException {
    return instantiate(classForName(className));
  }

  /**
   * Creates an instance of a class
   *
   * @param clazz - the class to create
   * @return An instance of the class
   * @throws InstantiationException If the class cannot be instantiaed
   * @throws IllegalAccessException If the class is not public, or other access problems arise
   */
  public static Object instantiate(Class clazz)
      throws InstantiationException, IllegalAccessException {
    return clazz.newInstance();
  }

  private static ClassLoader getClassLoader() {
    if (defaultClassLoader != null) {
      return defaultClassLoader;
    } else {
      return Thread.currentThread().getContextClassLoader();
    }
  }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色偷偷成人一区二区三区91| 久久er99热精品一区二区| 91视视频在线观看入口直接观看www | 欧美一区二区性放荡片| 亚洲chinese男男1069| 欧美一区二区三区白人| 激情文学综合网| 国产精品福利av| 欧美伊人久久久久久久久影院 | 精品亚洲成av人在线观看| 久久综合给合久久狠狠狠97色69| 高清国产午夜精品久久久久久| 亚洲欧洲成人精品av97| 欧美日韩黄色一区二区| 久久成人免费网站| 国产精品免费aⅴ片在线观看| 在线日韩一区二区| 精品一区二区三区视频在线观看| 国产日韩亚洲欧美综合| 一本到不卡精品视频在线观看| 亚洲一区电影777| 亚洲激情一二三区| 日韩视频免费观看高清在线视频| 久久精品视频在线免费观看| 99久久伊人精品| 婷婷六月综合亚洲| 国产日韩av一区| 欧美日韩二区三区| 国产精品99久久不卡二区| 一区二区三国产精华液| 日韩精品一区二区三区在线播放| 成人app下载| 久99久精品视频免费观看| 国产精品久久毛片a| 7777精品久久久大香线蕉| 成人在线综合网| 日韩福利视频网| 综合久久给合久久狠狠狠97色| 日韩欧美综合一区| 色天使色偷偷av一区二区| 韩国一区二区视频| 日韩国产欧美在线观看| 国产精品久久国产精麻豆99网站| 91精品国产综合久久福利| 99精品在线免费| 国产成人亚洲综合a∨猫咪| 日韩中文字幕一区二区三区| 亚洲欧洲日韩女同| 久久人人爽爽爽人久久久| 欧美精品在欧美一区二区少妇| av福利精品导航| 国产精品99久久久久久久vr| 蜜桃av一区二区三区电影| 亚洲一级二级三级在线免费观看| 国产精品另类一区| 国产亚洲成av人在线观看导航| 欧美一区二区三区免费在线看| 欧美在线观看18| 色狠狠综合天天综合综合| 成人精品免费看| 成人性生交大片免费看中文网站| 精品影院一区二区久久久| 天堂久久一区二区三区| 一二三区精品视频| 一区二区三区四区五区视频在线观看| 日本一区二区综合亚洲| 国产欧美日韩在线观看| 久久免费看少妇高潮| www一区二区| 精品国产第一区二区三区观看体验| 欧美一区二区三区四区久久| 91精品国产综合久久精品app| 欧美色图第一页| 欧美三级电影网| 717成人午夜免费福利电影| 91麻豆精品国产综合久久久久久 | 欧美在线999| 欧日韩精品视频| 欧美日韩日日夜夜| 91精品国产福利在线观看| 日韩欧美成人激情| 精品久久久网站| 欧美国产精品久久| 久久精品亚洲乱码伦伦中文| 国产欧美一区二区精品仙草咪| 国产日韩影视精品| 亚洲日本va在线观看| 亚洲免费观看在线视频| 亚洲成人你懂的| 日本在线不卡视频| 国产麻豆成人精品| 97久久久精品综合88久久| 在线观看视频一区二区| 欧美一级黄色大片| 久久精品亚洲乱码伦伦中文 | 免费看日韩精品| 激情五月婷婷综合| 91亚洲资源网| 91精品在线观看入口| 精品国产百合女同互慰| 亚洲国产精品二十页| 一区二区理论电影在线观看| 日产国产欧美视频一区精品| 国模冰冰炮一区二区| 99re这里都是精品| 91精品国产一区二区三区| 日本一区二区三区高清不卡 | 婷婷开心久久网| 久久99国产精品成人| www.日韩av| 欧美一区二区在线看| 国产精品高潮呻吟| 人妖欧美一区二区| 99视频精品免费视频| 欧美一区二区三区色| 国产欧美视频在线观看| 亚洲综合一区在线| 国产精品1区二区.| 欧美猛男超大videosgay| 国产亚洲短视频| 日韩精品电影在线观看| 波波电影院一区二区三区| 91精品国产91久久久久久一区二区 | 亚洲国产一二三| 国产精品亚洲第一| 欧美三级电影精品| 中文字幕色av一区二区三区| 秋霞国产午夜精品免费视频| 95精品视频在线| 久久蜜桃av一区精品变态类天堂| 一区二区三区欧美日| 国产一区二区美女| 91精品麻豆日日躁夜夜躁| 中文字幕人成不卡一区| 国产永久精品大片wwwapp| 欧美日韩高清一区| 亚洲精品一二三| 国产成人综合在线观看| 欧美成人激情免费网| 亚洲成人免费av| 在线观看亚洲精品视频| 中文字幕第一区第二区| 久久av资源站| 91精品国产欧美日韩| 亚洲一区二区三区中文字幕在线| 国产福利一区二区三区| 精品久久久久久综合日本欧美| 偷拍亚洲欧洲综合| 欧美亚洲免费在线一区| 成人免费视频在线观看| 国产成人精品在线看| 欧美一区二区三区四区五区| 丝袜美腿高跟呻吟高潮一区| 在线观看视频欧美| 亚洲精品免费在线播放| a4yy欧美一区二区三区| 中文字幕+乱码+中文字幕一区| 国产一区二区精品久久99| 91精品婷婷国产综合久久性色 | 国产精一区二区三区| 69堂精品视频| 秋霞电影一区二区| 欧美一个色资源| 裸体一区二区三区| 日韩视频一区在线观看| 六月丁香婷婷久久| 久久久噜噜噜久久人人看 | 韩国成人在线视频| 久久免费精品国产久精品久久久久| 国产一区二区免费在线| 久久久九九九九| 成人免费毛片a| 亚洲丝袜自拍清纯另类| 色婷婷久久久久swag精品| 一区二区三区中文字幕| 91高清在线观看| 午夜精品成人在线视频| 4hu四虎永久在线影院成人| 视频在线观看一区| 日韩欧美的一区二区| 国产精品88888| 综合婷婷亚洲小说| 欧美色视频一区| 乱一区二区av| 国产精品毛片大码女人 | 91精品国产欧美一区二区18| 久久国产尿小便嘘嘘尿| 国产亚洲欧美一区在线观看| 成人免费看片app下载| 亚洲精品免费在线播放| 制服丝袜在线91| 国产精品一级片| 亚洲蜜臀av乱码久久精品蜜桃| 欧美日韩高清在线| 国产一区不卡视频| 一区二区三区在线影院| 欧美大片拔萝卜| 色综合天天综合色综合av| 秋霞午夜鲁丝一区二区老狼| 中文字幕成人网|