java¶ÁÈ¡XMLÎļþ
1.¶ÁÈ¡XMLÎļþµÄÀࣺ
public class XMLUtils {
private final String DB_XML_FILE = "/XMLSetting.xml";
public Properties getPropertiesfromXML() {
URL url = XMLUtils.class.getResource(dBXMLFILE);
URI uri;
try {
uri = url.toURI();
InputSource xmlfile = new InputSource(uri.getPath());
MyDefaultHandler handler = new MyDefaultHandler ();
SAXParserFactory parserFactory = SAXParserFactory.newInstance();
SAXParser parser = parserFactory.newSAXParser();
parser.parse(xmlfile, handler);
return handler.getProps();
} catch (ParserConfigurationException e) {
System.out.println(e.getMessage());
return null;
} catch (SAXException e) {
System.out.println(e.getMessage());
return null;
} catch (IOException e) {
System.out.println(e.getMessage());
return null;
} catch (URISyntaxException e) {
System.out.println(e.getMessage());
return null;
}
}
}
2.´¦ÀíXMLÎļþµÄÀࣺ
import java.util.Properties;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
import com.app.common.Constants;
public class MyDefaultHandler extends DefaultHandler {
private Properties props;
private String key = "";
private StringBuffer value = new StringBuffer();
public MyDefaultHandler() {
props = new Properties();
}
@Override
public void characters(char[] ch, int start, int length)
throws SAXException {
value.append(ch, start, length);
}
@Override
public void endElement(String uri, String localName, String qName)
throws SAXException {
props.put(key, value.toString().trim());
}
@Override
public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException {
value.delete(0, value.length());
key = attributes.getValue(Constants.KEY);
}
public Properties getProps() {
return this.props;
}
}
3.main£º
import java.util.Properties;
pu
Ïà¹ØÎĵµ£º
/**
* ¶ÑÅÅÐò
*
* */
public void heapSort(double[] a){
double temp;
initCreateHeap(a);
for(int i = a.length - 1; i > 0; i --){
temp = a[0];
a[0] = a[i];
a[i] = temp;
createHeap(a, i, 0);
}
}
/**
* ½«Êý×é¿´³ÉÍêÈ«¶þ²æÊ÷£¬½¨Á¢×î´ó¶Ñ
* */
private ......
´Ó±¾ÏµÁÐÇ°ÃæµÄÎÄÕÂÖУ¬ÄúÁ˽⵽·´ÉäµÄÐÔÄܱÈÖ±½Ó·ÃÎÊÒªÂýÐí¶à±¶£¬²¢Á˽âÁËÓà Javassist ºÍ Apache
Byte Code Engineering Library £¨BCEL£©½øÐÐclassworking¡£Java ¹ËÎÊ Dennis
Sosnoski ͨ¹ýÑÝʾÈçºÎʹÓÃÔËÐÐʱ classworking£¬À´ÓÃÈ«ËÙǰ½øµÄÉú³É´úÂëÈ¡´ú·´Éä´úÂ룬´Ó¶ø½áÊøËûµÄ Java ±à³ÌµÄ¶¯Ì¬ÐÔ
ϵÁС£
¼ÈÈ»ÄúÒѾ ......
Apache Byte Code Engineering Library (BCEL)¿ÉÒÔÉîÈë Java
ÀàµÄ×Ö½ÚÂë¡£¿ÉÒÔÓÃËüת»»ÏÖÓеÄÀà±íʾ»òÕß¹¹½¨ÐµÄÀ࣬ÒòΪ BCEL ÔÚµ¥¶ÀµÄ JVM
Ö¸Áî¼¶±ðÉϽøÐвÙ×÷£¬ËùÒÔ¿ÉÒÔÈÃÄú¶Ô´úÂëÓÐ×îÇ¿´óµÄ¿ØÖÆ¡£²»¹ý£¬ÕâÖÖÄÜÁ¦µÄ´ú¼ÛÊǸ´ÔÓÐÔ¡£ÔÚ±¾ÎÄÖУ¬Java ¹ËÎÊ Dennis Sosnoski
½éÉÜÁË BCEL µÄ»ù±¾ÄÚÈÝ£¬²¢Òýµ¼¶ÁÕßÍê³ÉÒ»¸öʾÀ ......
1¡¢http://java.sun.com/
(Ó¢ÎÄ)
SunµÄJavaÍøÕ¾£¬ÊÇÒ»¸öÓ¦¸Ã¾³£È¥¿´µÄµØ·½¡£²»Óöà˵¡£
2¡¢http://www-900.ibm.com/developerWorks/cn/
IBMµÄdeveloperWorksÍøÕ¾£¬Ó¢ÓïºÃµÄÖ±½ÓÈ¥Ó¢ÎÄÖ÷Õ¾µã¿´¡£ÕâÀï²»µ«ÊÇÒ»¸ö¼«ºÃµÄÃæÏò¶ÔÏóµÄ·ÖÎöÉè¼ÆÍøÕ¾£¬Ò²ÊÇWebServices£¬Java£¬Linux¼«ºÃµÄÍøÕ¾¡£Ç¿ÁÒÍÆ¼ö£¡£¡£¡
3¡¢http://www.j ......
JavaÈçºÎ²Ù×÷Word, Excel, PDFÎĵµ£¿
http://www.sina.com.cn 2006Äê08ÔÂ23ÈÕ 14:55 ̫ƽÑóµçÄÔÍø
×÷ÕߣºÊ¢ÖÒÁ¼
¡¡¡¡²Î¿¼:
¡¡¡¡http://danadler.com/jacob/
¡¡¡¡http://jakarta.apache.org/poi/
¡¡¡¡http://www.onjava.com/pub/a/onjava/2003/01/22/poi.html
¡¡¡¡http://www.c ......