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

ÀûÓÃjava Api½âÎöXML

import java.io.IOException;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
/**
 * Usage: You can get a instance of Document from a string of xml.
 * This class supply some method to read a document.
 *
 */
public class XMLParser {
 /**
  * Get a instance of Document from a string of xml.
  *
  * @param xmlStr
  * @return Document
  */
 public static Document parse(String xmlStr) {
  if (xmlStr == null) {
   return null;
  }
  StringReader reader = new StringReader(xmlStr);
  InputSource source = new InputSource(reader);
  DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
  DocumentBuilder builder = null;
  try {
   builder = factory.newDocumentBuilder();
   
  } catch (ParserConfigurationException e) {
   e.printStackTrace();
  }
  if(builder == null){
   return null;
  }
  Document doc = null;
  try {
   doc = builder.parse(source);
  } catch (SAXException e) {
   e.printStackTrace();
  } catch (IOException e) {
   e.printStackTrace();
  }
  return doc;
 }
 
 /**
  * Get Item Value.
  * @param node
  * @return String
  */
 public static String getItemValue(Node node){
  String value = "";
  if(node == null){
   retur


Ïà¹ØÎĵµ£º

JavaÈçºÎ±éÀúMCËùÓÐITEM


Java
鍼뱎˜
MC
ËùÓÐ
ITEM
 
1
¡¢
mc
±éÀú
item
Ô­Àí
      
Mc
±éÀú
item
Óõ½µÄÃüÁîÓÐÈý¸ö£º
stats items
£¬
stats cachedump, get
¡£Í¨¹ý
telnet
³ÌÐò
telnet
µ½
mc
·þÎñÆ÷ÉÏ£¨
telnet ip
µØÖ·
¶Ë¿ÚºÅ£¬Èç
telnet 192.168.0.1 11211
£©£¬ÒÀ´ÎÖ ......

javaÖÐthis¹Ø¼ü×ÖÓ÷¨

 /**
* this¹Ø¼ü×ÖÓ÷¨
*/
public class Flower {

int petalCount = 0;
String s = "initial value";

Flower(int petals){
petalCount = petals;
System.out.println("Constructor with one int arg");
}

Flower(String ss){
System.out.println("Constr ......

¹ØÓÚ Java ÖеĽӿÚ


 ½Ó¿ÚÖв»¿ÉÒÔ¶¨Òå¹¹Ôì·½·¨
½Ó¿ÚÖÐÖ»ÄÜÓÐ public static final µÄ±äÁ¿ ºÍ public abstract µÄ·½·¨£¬ÆäËü¶¼²»¿ÉÒÔ¡£
ÀýÈ磺
´úÂëÀïÊÇÕâÑùдµÄ
public interface B{
   
    StringBuilder sb=null;
     
    void fun();
  & ......

¹ØÓÚ java swing ÖеÄrepaint ºÍ revalidate º¬Òå

   repaint ¶Ô×é¼þ½øÐÐÖػ棬±ÈÈçÒ»¸öpanel£¬µ±ÄãremoveµôpanelÀïÃæµÄÒ»¸ö×é¼þʱ£¬Äã±ØÐëµ÷ÓÃrepaint·½·¨²ÅÄܶÔpanel½øÐÐÖػ棬½øÐÐˢУ¬ÄãÏëҪɾ³ýµÄ×é¼þ²ÅÄÜÔÚ½çÃæÉÏÏûʧ¡£
   revalidate ¶Ô×é¼þ½øÐÐÑéÖ¤£¬±ÈÈçÒ»¸öpanel£¬µ±ÄãremoveµôpanelÀïÃæµÄÒ»¸ö×é¼þʱ£¬µ±Äãµ÷ÓÃrevalidate·½·¨ºó£¬panelµÄ²¼ ......

java.lang.OutOfMemoryError: Java heap space

 
ÎÊÌâÃèÊö
Exception in thread "main" java.lang.OutOfMemoryError:
Java heap space
½â¾ö·½°¸[ת]
Ò»Ö±¶¼ÖªµÀ¿ÉÒÔÉèÖÃjvm heap´óС£¬Ò»Ö±ÓÃeclipseд/µ÷ÊÔjava³ÌÐò¡£Ò»Ö±ÓÃÃüÁîÐÐor
console¼Ó²ÎÊýÅܳÌÐò¡£ÏÖÏó£ºÔÚeclipseµÄÅäÖÃÎļþeclipse.iniÖÐÉèÖÃ-vmargs -Xms500m
-Xmx1024m
£¬ÔÚeclipseÖ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ