Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Java ʵÏÖÎļþ·Ö¸îºÏ²¢µÄ´úÂë

import java.io.*;
class Fen{
String fileName;
int size;
Fen(String fileName,String size){
this.fileName = fileName;
this.size = Integer.parseInt(size)*1024;
}
public void cut()throws Exception{
int maxx = 0;
File inFile = new File(fileName);
int fileLength = (int)inFile.length(); //È¡µÃÎļþµÄ´óС
int value; //È¡µÃÒª·Ö¸îµÄ¸öÊý
RandomAccessFile inn = new RandomAccessFile(inFile,"r");//´ò¿ªÒª·Ö¸îµÄÎļþ
value = fileLength/size;
int i=0;
int j=0;
//¸ù¾ÝÒª·Ö¸îµÄÊýÄ¿Êä³öÎļþ
for (;j File outFile = new File(inFile.getName()+j+"zzii");
RandomAccessFile outt= new RandomAccessFile(outFile,"rw");
maxx+=size;
for (;i outt.write(inn.read());
}
outt.close();
}
File outFile = new File(inFile.getName()+j+"zzii");
RandomAccessFile outt= new RandomAccessFile(outFile,"rw");
for(;i
outt.write(inn.read());
}
outt.close();
inn.close();
}
}
class He{
String fileName;
String filterName;
He(String fileName,String filterName){
this.fileName = fileName;
this.filterName = filterName;
}
public void unite()throws Exception{
String [] tt;
File inFile = new File("."); //ÔÚµ±Ç°Ä¿Â¼ÏµÄÎļþ
File outFile = new File(fileName); //È¡µÃÊä³öÃû
RandomAccessFile outt= new RandomAccessFile(outFile,"rw");
//È¡µÃ·ûºÏÌõ¼þµÄÎļþÃû
tt = inFile.list(new FilenameFilter(){
public boolean accept(File dir,String name){
String rr = new File(name).toString();
return rr.endsWith(filterName);
}
});
//´òÓ¡³öÈ¡µÃµÄÎļþÃû
for (int i = 0;i System.out.println(tt[i]);
}
//´ò¿ªËùÓеÄÎļþÔÙдÈëµ½Ò»¸öÎļþÀï
for(int i=0;i inFile = new File(tt[i]);
RandomAccessFile inn= new RandomAccessFile(inFile,"r");
int c;
while((c=inn.read())!=-1)
outt.write(c);
}
outt.close();
}
}
public class test{
public static void main(final String [] args)throws Exception{
if(args.length==0){
print();
return;
}
if(args[0].equals("-c")){
Fen cutt = new Fen(args[1],args[2]);
cutt.cut();
}
else if (args[0].equals("-r")){
He hee = new He(args[1],args[2]);
hee.unite();
}
else


Ïà¹ØÎĵµ£º

Java³ÌÐòÁ¬½ÓSQL Server

µÚÒ»£ºÒªÉèÖÃSQL ServerµÄTCP/IP·þÎñ
1) ´ò¿ªSQL Server Configuration Manager”,Ë«»÷“SQL Server 2005ÍøÂçÅäÖÔ£¬µã»÷“*** µÄЭÒé” (×¢Ò⣺***´ú±íʵÀýÃüÃû£¬ÀýÈ磺accpDBµÄЭÒé)
2) Ñ¡ÔñÓұߴ°¿ÚÖеēTCP/IP”ЭÒ飬ÓÒ¼üµ ......

java³£ÓÃÉè¼ÆÄ£Ê½


µ¥Àýģʽ.
¼ò¶øÑÔÖ®£¬¾ÍÊÇÒ»¸öÀàÖ»ÓÐÒ»¸öʵÀý¡£
Singleton.java£º
package com.xfimti.sigleton;
public class Singleton
{
 /*µÚÒ»ÖÖ·½Ê½¡£*/
 private static Singleton singleton = new Singleton();
 /*µÚ¶þÖÖ·½Ê½¡£*/
 private static Singleton mySingleton = null;
 
 p ......

¹úÍâjavaÍøÕ¾´óÈ«

¹úÍâjavaÍøÕ¾´óÈ«
http://www.javaalmanac.com- Java¿ª·¢ÕßÄê¼øÒ»ÊéµÄÔÚÏß°æ±¾. ÒªÏë¿ìËٲ鵽ijÖÖJava¼¼ÇɵÄÓ÷¨¼°Ê¾Àý´úÂë, ÕâÊÇÒ»¸ö²»´íµÄÈ¥´¦.
http://www.onjava.com - O'ReillyµÄJavaÍøÕ¾. ÿÖܶ¼ÓÐÐÂÎÄÕÂ.
http://java.sun.com - ¹Ù·½µÄJava¿ª·¢ÕßÍøÕ¾ - ÿÖܶ¼ÓÐÐÂÎÄÕ·¢±í.
http://www.developer.com/java - ......

JavaÊäÈëÊý¾ÝÁ÷Ïê½â


<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå" ......

JAVA String¶ÔÏóºÍ×Ö·û´®³£Á¿µÄ¹ØÏµ½âÎö

JAVA String¶ÔÏóºÍ×Ö·û´®³£Á¿µÄ¹ØÏµ½âÎö
1 ×Ö·û´®ÄÚ²¿Áбí
  JAVAÖÐËùÓеĶÔÏó¶¼´æ·ÅÔÚ¶ÑÀïÃæ£¬°üÀ¨String¶ÔÏó¡£×Ö·û´®³£Á¿±£´æÔÚJAVAµÄ.classÎļþµÄ³£Á¿³ØÖУ¬ÔÚ±àÒëÆÚ¾ÍÈ·¶¨ºÃÁË¡£
ÐéÄâ»úΪÿ¸ö±»×°ÔصÄÀàÐÍά»¤Ò»¸ö³£Á¿³Ø¡£³£Á¿³Ø¾ÍÊǸÃÀàÐÍËùÓó£Á¿µÄÒ»¸öÓÐÐò¼¯ºÏ£¬°üÀ¨Ö±½Ó³£Á¿(string¡¢integerºÍfloat point³ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ