ÓÃJavaʵÏÖÎļþ·Ö¸î\ºÏ²¢²Ù×÷
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.sql.Timestamp;
import java.util.Arrays;
public class SmallToBig {
private String newFileName;// ÐÂÎļþÃû×Ö
private String filterName;// ¹ýÂ˹æÔòÃû×Ö
private String oldFileName;// ÀÏÎļþÃû×Ö
public SmallToBig(String oldFileName, String newFileName, String filterName) {
this.newFileName = newFileName;
this.filterName = filterName;
this.oldFileName = oldFileName;
}
public void unite() {
Timestamp startTime = null; // »ñµÃϵͳµÄ¿ªÊ¼Ê±¼ä
Timestamp endTime = null; // »ñµÃϵͳµÄ½áÊøʱ¼ä
startTime = new Timestamp(System.currentTimeMillis());
String[] fileNameTemp;
File inFile = new File("F:\\workspace\\glpt\\database\\temporaryfiles"); //ÁÙʱÎļþËùÔÚµÄĿ¼
File outFile = new File(newFileName); // È¡µÃÊä³öÎļþµÄÃû×Ö
RandomAccessFile outt = null;
byte[] bytes = new byte[2048];
try {
outt = new RandomAccessFile("F:\\workspace\\glpt\\database\\data\\"
+ outFile, "rw");
// È¡µÃ·ûºÏÌõ¼þµÄÎļþÃû
fileNameTemp = inFile.list(new FilenameFilter() {
public boolean accept(File dir, String name) {
System.out.println("dir = " + dir);
System.out.println("name = " + name);
String rr = new File(name).toString();
return rr.endsWith(filterName);
}
});
Arrays.sort(fileNameTemp);// ¶ÔÎļþÃûÅÅÐò
// ´ò¿ªËùÓеÄÎļþÔÙдÈëµ½Ò»¸öÎļþÀï
for (int i = 0; i < fileNameTemp.length; i++) {
for (int j = 0; j < fileNameTemp.length; j++) {
if (fileNameTemp[j].equals(oldFileName + i + filterName)) {
Sys
Ïà¹ØÎĵµ£º
JAVA finally×Ö¾äµÄÒì³£¶ªÊ§ºÍ·µ»ØÖµ¸²¸Ç½âÎö
JavaÐéÄâ»úÔÚÿ¸ötryÓï¾ä¿éºÍÓëÆäÏà¹ØµÄcatch×Ó¾äµÄ½áβ
´¦¶¼»á“µ÷ÓÔfinally×Ó¾äµÄ×ÓÀý³Ì¡£Êµ¼ÊÉÏ£¬finally×Ó¾äÔÚ·½·¨ÄÚ²¿µÄ±íÏÖºÜÏó“΢ÐÍ×ÓÀý³Ì”¡£finally×Ó¾äÕý³£½áÊøºó£Ö¸µÄÊÇfinally×Ó¾äÖÐ×îºóÒ»ÌõÓï¾äÕý³£Ö´ÐÐÍê±Ï£¬²»°üÀ¨Å׳öÒì³££¬»òÖ´ÐÐre ......
ÓõÄÊÇMySQLÊý¾Ý¿â¡£
1£¬½¨Ò»¸öuserdb¿â£¬ÔÙ½¨userinfo±í£¬×ֶΣºid(int),username(varchar),password(varchar)¡£
create database userdb;
use userdb;
create table userinfo(
id int(10) not null auto_increment,
username varchar(20),
password varchar(20),
primary key(id));
2£¬DBConnection.jav ......
½ñÌìÊÇÀ´´«ÖDz¥¿ÍµÄµÚÒ»Ì죬ÐÒ¿÷֮ǰ¿´¹ýthinking in java ¸Ð¾õÀí½â²»ÊǺܳÔÁ¦£¬µ«ÊǸоõͦÀÛµÄ
1¡£Íâ¹Ò²å¼þµÄ²½Ö裺
1£¬ÔÚeclipseµÄĿ¼Ï½¨Á¢linksĿ¼¡£
2£¬ÔÚlinksĿ¼Ï£¬½¨Á¢Ò»¸öÎļþ£¬ÄÚÈÝΪ²å¼þeclipseĿ¼µÄ¸¸Ä¿Â¼£»
path=²å¼þeclipseĿ¼µÄ¸¸Ä¿Â¼ path=F:\\Eclipse\\NLpack1-eclipse-SDK-3.2.1-w ......
19.2 ·ÃÎÊÔ¶³ÌJava¶ÔÏóΪÁËʵÏÖ¶ÔÔ¶³ÌJava¶ÔÏóµÄ·ÃÎÊ£¬ÔÚ·þÎñÆ÷¶Ë£¬ÐèÒªÍê³ÉÈçϼ¸¸ö²½Ö裺 1. ´´½¨LiveCycle Data Service WebÓ¦Óã» 2. ʵÏÖPOJO JavaÀࣻ 3. ÔÚLiveCycle Data Service WebÓ¦ÓÃÖв¿ÊðPOJO JavaÀࣻ 4. ÅäÖÃremote-config.xmlÎļþ£¬ÉùÃ÷desination½Úµã£¬Ö¸ÏòPOJO JavaÀà¡£ ÔÚ¿Í»§¶ËÓ¦ÓÃÖУ¬ÐèҪʵÏÖ£º 1. ......
¹Ø¼ü×Ö: java regex, regular expression
ÕýÔò±í´ïʽÔÚ´¦ÀíÎı¾·½ÃæÓô¦·Ç³£´ó£¬×îÔçÏñÔÚPerlºÍawkÓïÑÔÖУ¬ÌṩÁËÕâÖÖ»úÖÆ£¬JavaÔÚJava 2ÖÐÒ²Ôö¼ÓÁËÕýÔò±í´ïʽÕâ¸ö°üjava.util.regex¡£Õâ¸ö°üΪÓû§Ê¹ÓÃÕýÔò±í´ïʽ£¬ÌṩÁËÒ×ÓöøÈ«ÃæµÄÖ§³Ö¡£ÎÒµÄÑо¿·½ÏòÊÇwebÍÚ¾ò¡£´ÓÍøÒ³ÖÐÌáÈ¡ÄÚÈÝ,´¦ÀíÎı¾£¬µ±È»ÐèÒªÕýÔò±í´ïʽÕâ¸öÇ¿´ ......