java ·´Éä
package test;
public class TestFactory<T> {
private Class <T> cls;
public String testabc="";
public TestFactory(String clsName) throws ClassNotFoundException{
cls=(Class<T>) Class.forName(clsName);
}
public T getInstance() throws InstantiationException,
IllegalAccessException{
return cls.newInstance();
}
public static void main(String[] args)
throws ClassNotFoundException,
InstantiationException, IllegalAccessException {
TestFactory tf=new TestFactory(String.class.getName().toString());
String aa=(String)tf.getInstance();
System.
Ïà¹ØÎĵµ£º
Introduction to XML and XML With Java
If you are looking for sample programs to parse a XML file using DOM/SAX parser or looking for a program to generate a XML file please proceed directly to programs.
This small tutorial introduces you to the basic concepts of XML and using Xer ......
/**
* ÏÂÔØÎļþ
* @param filePath --ÎļþÍêÕû·¾¶
* @param response --HttpServletResponse¶ÔÏó
*/
public static void downloadFile(
String filePath,
javax.servlet.http.HttpServletResponse response) {
String fileName = ""; //ÎļþÃû£¬Êä³öµ½Óû§µÄÏÂÔØ¶Ô»°¿ò
//´ÓÎļþÍêÕû·¾¶ÖÐÌáÈ¡ÎļþÃû£¬²¢½øÐбà ......
Ê×ÏÈÐèÒªÖªµÀµÄÊÇ£¬MP3ÎļþµÄÎļþÐÅÏ¢¶¼·ÅÔÚÎļþ×îºóµÄ128¸ö×Ö½ÚÀïÃæ£¬Õâ128¸ö×Ö½Ú·Ö±ð´æ´¢µÄÐÅÏ¢ÈçÏ£º
char Header[3]; /* ±êǩͷ±ØÐëÊÇ"TAG"·ñÔòÈÏΪûÓбêÇ© */
char Title[30]; /* ±êÌâ */
char Artist[30]; /* ×÷Õß&n ......