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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? fileutil.java

?? java覆蓋率測試工具
?? JAVA
字號(hào):
/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is the reusable ccl java library
 * (http://www.kclee.com/clemens/java/ccl/).
 *
 * The Initial Developer of the Original Code is
 * Chr. Clemens Lee.
 * Portions created by Chr. Clemens Lee are Copyright (C) 2002
 * Chr. Clemens Lee. All Rights Reserved.
 *
 * Contributor(s): Chr. Clemens Lee <clemens@kclee.com>
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */

package net.sourceforge.cobertura.javancss;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

/**
 * Utility class for file operations.<p>
 *
 * Simple but most commonly used methods of this class are:<br>
 * - {@link #readFile(java.lang.String) readFile}<br>
 * - {@link #concatPath(java.lang.String, java.lang.String) concatPath}<br>
 *
 * Other less frequently used but still handy methods are:<br>
 * - {@link #normalizeFileName(java.lang.String) normalizeFileName} to take the current user directory into account via the 'user.dir' system property<br>
 *
 * @version  $Id: FileUtil.java 384 2006-03-17 20:10:49Z thekingant $
 * @author <a href="http://www.kclee.com/clemens/">
 *         Chr. Clemens Lee</a>
 *         &lt;<a href="mailto:clemens@kclee.com">
 *         clemens@kclee.com
 *         </a>>
 */
public class FileUtil
{

	/**
	 * Utility class which should never instanciate itself.
	 */
	private FileUtil()
	{
		super();
	}

	/**
	 * Concatenates a file path with the file name. If 
	 * necessary it adds a File.separator between the path
	 * and file name. For example "/home" or "/home/" and "clemens" both
	 * become "/home/clemens".<p>
	 *
	 * This method is inspired from the FrIJDE project out
	 * of the gCollins.File.FileTools class.<p>
	 *
	 * FrIJDE Homepage:
	 * http://amber.wpi.edu/~thethe/Document/Besiex/Java/FrIJDE/
	 *
	 * @param    sPath_   a directory path. Is not allowed to be null.
	 * @param    sFile_   the base name of a file.
	 *
	 * @return            sPath_ if sFile_ is empty.
	 */
	private static String concatPath(String sPath_, String sFile_)
	{
		Util.panicIf(sPath_ == null);
		//System.out.println("ccl.util.FileUtil.concatPath(..).sPath_: --->" + sPath_ + "<---");
		//System.out.println("ccl.util.FileUtil.concatPath(..).sFile_: " + sFile_);

		String sRetVal = sPath_;

		if (!Util.isEmpty(sFile_))
		{
			if (sPath_.length() > 0 && !sPath_.endsWith(File.separator))
			{
				sRetVal += File.separator;
			}

			sRetVal += sFile_;
		}

		return sRetVal;
	}

	/**
	 * Reads a File and returns the content in a String.
	 * CRLF -> LF conversion takes place. This is a convenience method so you don't
	 * need to bother creating a file reader object and closing it after it has
	 * been used.
	 *
	 * @param    sFileName_   the name of the file to read.
	 *
	 * @return                a string with the content of the file but without 
	 *                        any CR characters.
	 *
	 * @throws   FileNotFoundException   if file does not exist.
	 * @throws   IOException             if any file operation fails.
	 */
	public static String readFile(String sFileName_) throws IOException, FileNotFoundException
	{
		StringBuffer sFileContent = new StringBuffer(100000);

		try
		{
			FileReader frIni = new FileReader(sFileName_);
			if (frIni != null)
			{
				BufferedReader brIni = new BufferedReader(frIni);
				if (brIni != null)
				{
					while (brIni.ready())
					{
						String sLine = brIni.readLine();
						if (sLine == null)
						{
							break;
						}
						sFileContent.append(sLine).append('\n');
					}
					brIni.close();
				}
				frIni.close();
			}
		}
		catch (FileNotFoundException fileNotFoundException)
		{
			throw new FileNotFoundException("No such file: '" + sFileName_ + "'");
		}

		return sFileContent.toString();
	}

	/**
	 * @return It's the canonical path of sFileName_.
	 */
	private static String getAbsoluteFileName(String sFileName_)
	{
		String sRetVal = null;

		try
		{
			File pFile = new File(sFileName_);
			sRetVal = pFile.getCanonicalPath();
		}
		catch (Exception e)
		{
			return null;
		}

		return sRetVal;
	}

	/**
	 * This method returns an absolute (canonical)
	 * file name. The difference to getAbsoluteFileName
	 * is that this method uses the system property
	 * "user.dir" instead of the native system's current 
	 * directory. This way you get a chance of changing
	 * the current directory inside Java and let your 
	 * program reflect that change.
	 */
	public static String normalizeFileName(String sFile)
	{
		return normalizeFileName(sFile, (String)System.getProperties().get("user.dir"));
	}

	/**
	 * This method returns an absolute (canonical)
	 * file name. The difference to getAbsoluteFileName
	 * is that this method uses the system property
	 * sUserDir instead of the native system's current 
	 * directory. This way you get a chance of changing
	 * the current directory inside Java and let your 
	 * program reflect that change.
	 */
	private static String normalizeFileName(String sFile, String sUserDir)
	{
		sFile = sFile.trim();
		if (Util.isEmpty(sFile) || sFile.equals("."))
		{
			sFile = sUserDir;
		}
		else if (!FileUtil.isAbsolute(sFile))
		{
			sFile = FileUtil.concatPath(sUserDir, sFile);
		}
		sFile = FileUtil.getAbsoluteFileName(sFile);

		return sFile;
	}

	/**
	 * Tests if the file represented by this File object is an absolute 
	 * pathname. The definition of an absolute pathname is system
	 * dependent. For example, on UNIX, a pathname is absolute if its first
	 * character is the separator character. On Windows
	 * platforms, a pathname is absolute if its first character is an 
	 * ASCII '\' or '/', or if it begins with a letter followed by a colon. 
	 */
	private static boolean isAbsolute(String sFileName_)
	{
		return new File(sFileName_).isAbsolute();
	}

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产综合在线| 懂色一区二区三区免费观看| 欧美中文字幕一区二区三区亚洲| 亚洲卡通动漫在线| 在线精品视频免费观看| 五月天激情综合网| 欧美精品一区二| 粉嫩绯色av一区二区在线观看| 亚洲色图制服丝袜| 在线播放视频一区| 国产综合色产在线精品| 中文字幕一区二区三区视频| 欧美日韩日日骚| 国产精品一区久久久久| 最新欧美精品一区二区三区| 欧美日本一道本在线视频| 国精产品一区一区三区mba视频| 国产精品系列在线| 欧美电影影音先锋| 岛国精品一区二区| 图片区小说区区亚洲影院| 精品国产乱码久久| 日韩一区二区三区四区五区六区| 亚洲一区二三区| 欧美大片一区二区| 91影院在线观看| 日韩精品电影在线观看| 国产精品久久久久一区二区三区共| 欧美在线观看你懂的| 国产一区视频网站| 亚洲国产日产av| 国产日韩视频一区二区三区| 欧美日韩情趣电影| 97久久精品人人澡人人爽| 男男视频亚洲欧美| 亚洲精品国产视频| 久久久99久久精品欧美| 欧美日本在线观看| 91啦中文在线观看| 国产成人免费在线观看不卡| 日韩黄色免费电影| 亚洲欧美激情一区二区| 精品99999| 欧美老女人第四色| 91在线看国产| 国产精品一级二级三级| 蜜臀av性久久久久av蜜臀妖精 | 欧美一区二区在线免费播放| 国产精品系列在线观看| 日本欧美大码aⅴ在线播放| 亚洲精品欧美激情| 久久久影院官网| 日韩三级伦理片妻子的秘密按摩| 欧美性受xxxx| 91一区二区三区在线播放| 国产一区二区三区久久久| 日韩成人一区二区| 亚洲一区在线免费观看| 一区在线播放视频| 亚洲国产精品高清| 欧美激情一区二区| 国产午夜三级一区二区三| 欧美成人a视频| 日韩免费看的电影| 日韩欧美亚洲国产另类| 欧美一二三四在线| 91精品国产手机| 91麻豆精品国产91久久久资源速度| 色噜噜狠狠成人中文综合| 99久久婷婷国产综合精品| 精品久久久久久久久久久久久久久久久 | 亚洲一二三区视频在线观看| 亚洲人成电影网站色mp4| 国产精品传媒入口麻豆| 国产精品免费丝袜| 国产精品成人网| 亚洲欧美日韩系列| 夜夜操天天操亚洲| 亚洲高清三级视频| 五月婷婷欧美视频| 奇米影视7777精品一区二区| 蜜臀av一区二区| 国产在线国偷精品免费看| 国产精品白丝jk白祙喷水网站| 国产经典欧美精品| 成人高清免费观看| 99精品久久只有精品| 91福利在线播放| 欧美日韩在线播| 日韩欧美在线不卡| 国产亚洲va综合人人澡精品 | 久久色.com| 国产精品欧美久久久久无广告 | 成人午夜碰碰视频| 色视频一区二区| 欧美精品电影在线播放| 久久精品视频免费| 欧美国产日产图区| 亚洲乱码一区二区三区在线观看| 一区二区欧美在线观看| 爽好多水快深点欧美视频| 蜜桃精品在线观看| 成人午夜激情在线| 精品视频在线免费看| 精品国产乱码久久久久久夜甘婷婷 | 国产成人av福利| 色婷婷国产精品| 日韩三级在线免费观看| 国产精品五月天| 亚洲第一久久影院| 国产一区二三区| 色吊一区二区三区| 精品国产乱码久久久久久老虎| 国产精品久久久久天堂| 婷婷中文字幕综合| 成人国产精品免费观看| 777久久久精品| 国产精品国产馆在线真实露脸| 五月婷婷另类国产| 成人动漫视频在线| 5566中文字幕一区二区电影| 亚洲国产精品高清| 日本视频中文字幕一区二区三区| 成人晚上爱看视频| 日韩午夜在线观看视频| 亚洲伦在线观看| 国产精品系列在线观看| 337p亚洲精品色噜噜狠狠| 中文字幕日韩欧美一区二区三区| 日本亚洲天堂网| 91在线观看污| 国产视频在线观看一区二区三区| 亚洲成av人片一区二区三区| 不卡视频一二三四| 久久综合久久综合久久| 亚洲成av人片在www色猫咪| 波多野洁衣一区| 337p粉嫩大胆色噜噜噜噜亚洲| 午夜不卡在线视频| 色妹子一区二区| 成人欧美一区二区三区白人 | 日本欧美一区二区在线观看| 色视频成人在线观看免| 国产精品黄色在线观看| 国产综合久久久久久久久久久久| 日韩欧美精品三级| 日韩和欧美的一区| 在线视频国产一区| 亚洲免费在线视频| 成人av午夜影院| 国产精品久久久久影院| 成人午夜视频福利| 国产日韩欧美a| 国产精品伊人色| 国产色产综合色产在线视频| 激情综合色丁香一区二区| 日韩免费高清电影| 奇米影视在线99精品| 91精品国产综合久久国产大片| 亚洲大片免费看| 欧美精品乱人伦久久久久久| 午夜欧美大尺度福利影院在线看 | 91在线一区二区| 国产精品天干天干在观线| 成人免费毛片嘿嘿连载视频| 国产精品网曝门| 91丝袜国产在线播放| 日韩毛片一二三区| 色综合久久综合| 亚洲一区二区三区在线播放| 在线看日本不卡| 日韩激情在线观看| 日韩一区二区影院| 另类小说欧美激情| 久久精品欧美一区二区三区不卡 | 欧美视频一区在线观看| 亚洲成人激情综合网| 91精品国产综合久久香蕉的特点| 免费在线观看日韩欧美| 久久亚洲影视婷婷| av亚洲精华国产精华精| 一区二区三区精品视频| 91麻豆精品国产无毒不卡在线观看| 美腿丝袜在线亚洲一区| 久久精品视频免费| 91网站最新地址| 亚洲成人福利片| 久久久久久久久蜜桃| 91亚洲国产成人精品一区二区三| 亚洲电影在线播放| 欧美精品一区二区高清在线观看| 成人国产免费视频| 亚洲成av人片www| 欧美精品一区二区三| 不卡视频一二三四| 香蕉成人啪国产精品视频综合网| 精品成a人在线观看| 色婷婷久久一区二区三区麻豆| 婷婷综合另类小说色区| 国产无人区一区二区三区|