我是学VB的,谁能帮我给每行加个注释
最好能每行加个注释,谢谢
package cn;
import javax.jws.WebService;
import org.opensolaris.os.dtrace.*;
import java.io.*;
@WebService()
public class Web {
public static void start() {
writeXMLHeader();
File f=new File( "/dtrace/NETWORKSTAT.D ");
Consumer consumer = new LocalConsumer();
consumer.addConsumerListener(new ConsumerAdapter() {
public void dataReceived(DataEvent e) {
writefile(e.getProbeData().toString());
writeXMLFooter();
}
});
try {
consumer.open();
consumer.compile(f);
consumer.enable();
consumer.go();
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
}
public static void writeXMLHeader(){
char[] buff = new char[1024];
try {
FileOutputStream outfile = null;
outfile = new FileOutputStream( "/project/WebApplication1/web/XML.xml ");
DataOutputStream dos=new DataOutputStream(outfile);
String header= " <?xml version=\ "1.0\ " encoding=\ "UTF-8\ "?> <NODES> ";