Java Îļþ Util
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import com.paic.is.dispatch.TMPEntry;
public class FileUtil
{
public static File getFileByRelativePath(String relativePath)
{
String absoluteFilePath = ProjectConfig.getApplicationRootPath() +
File.separator + relativePath;
return new File(absoluteFilePath);
}
public static String getInjectedFEFileContent(String relativeFilePath, String fileContent)
{
String FEString = readFEFileContent(relativeFilePath);
return fileContent + "\n" + FEString;
}
public static String readFEFileContent(String relativeFilePath)
{
String absoluteFilePath = ProjectConfig.getApplicationRootPath() +
File.separator + relativeFilePath;
File FEFile = new File(absoluteFilePath);
StringBuffer sb = new StringBuffer();
if(FEFile.exists() && FEFile.canRead() && !FEFile.isDirectory())
{
FileReader fr = null;
BufferedReader bReader = null;
try
{
fr = new FileReader(FEFile);
bReader = new BufferedReader(fr);
String line = null;
while((line = bReader.readLine()) != null)
{
sb.append("\n" +line);
}
}
catch(FileNotFoundException ex)
{
ExceptionDefaultHandler.handle(ex,
TMPEntry.getCurrentTMPFileName() + ".log");
}
catch(IOException ex)
{
ExceptionDefaultHandler.handle(ex,
TMPEntry.getCurrentTMPFileName() + ".log");
}
finally
{
try
{
if(null != bReader)
{
bReader.close();
}
if(null != fr)
{
fr.close();
}
}
catch(Exception exception)
{
ExceptionDefaultHandler.handle(exception,
TMPEntry.getCurrentTMPFileName() + ".log");
}
}
}
else
{
ThreadLog.MakeLog("We can not find the file : " +relativeFilePath,
TMPEntry.getCurrent
Ïà¹ØÎĵµ£º
create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ
......
java»º´æ¼¼ÊõÒ»£¨×ª£©
¿´Ò»Á£É³ÖеÄÊÀ½ç£¬ Ò»¶äÒ°»¨ÖеÄÌìÌᣠ°ÑÎÞÏÞÎÕÓÚÕÆÖУ¬ °ÑÓÀºãÎÕÓÚ˲¼ä¡£——ÍþÁ®• ²¼À³¿Ë
¿ªÊ¼ÌÖÂÛ»º´æÖ®Ç°,ÈÃÎÒÃÇÏÈÀ´ÌÖÂÛÌÖÂÛÁíÍâÒ»¸öÎÊÌâ:ÀíÂÛºÍʵ¼ù.´Óahuaxuan½Ó´¥µÄ³ÌÐòÔ±À´¿´,ÓеijÌÐòԱƫʵ¼ù,ÓеijÌÐòԱƫÀíÂÛ,µ«ÊÇÕâ¶¼ÊDz»ºÃµÄÐÐΪ,ÀíÂÛºÍʵ¼ùͬÑùÖØÒª,ÎÒÃÇÔÚ×öºÜ¶àº ......
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
public class ThreadLog
{
private final static String _detailLogFile = "log"+File.separator+"detail";
private static boolean _logFlag = true;
priv ......
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import com.paic.is.dispatch.TMPEntry;
public class DateTimeUtil
{
public final static String LOCAL_SHORT_DATE_FORMAT = "yyyy-MM-dd";
public final static String LOCAL_LONG_DATE_FORMAT = "yyyy-MM-dd H ......