javaµÄIO ¹ÜµÀÁ÷
Java code:
import java.io.IOException;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
public class TestPip {
public static void main(String[] args) {
PipedInputStream pis = new PipedInputStream();
PipedOutputStream pos = new PipedOutputStream();
try {
pis.connect(pos);//Á¬½Ó
} catch (IOException e) {
e.printStackTrace();
}
new Sender(pos).start();
new Ser(pis).start();
}
}
class Sender extends Thread{
private PipedOutputStream pos;
public Sender(PipedOutputStream pos){
this.pos = pos;
}
public void run(){
byte buf[] = new byte[1024];
try {
pos.write("Hello word".getBytes());
pos.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
class Ser extends Thread{
private PipedInputStream pis;
public Ser(PipedInputStream pis){
this.pis = pis;
}
public void run(){
byte buf[] = new byte[1024];
try {
int len = pis.read(buf);
System.out.println(new String(buf,0,len)+"\n How do you");
} catch (IOException e) {
e.printStackTrace();
}
}
}
Java code
Code highlighting produc
Ïà¹ØÎÊ´ð£º
import java.io.*;
class FileTest
{
public static void main(String [] args) throws Exception
{
File fDir=new File(File.separator);
String strFile="javaÔ´´úÂë²âÊÔ"+File.separato ......
ÔÚ°²×°Java±àÒëÆ÷µÄEclipseµÄʱºò£¬¶Ô»·¾³±äÁ¿½øÐÐÁËÅäÖã¬ÔÚ°²×°MySQlµÄʱºòÒ²Òª¶Ô»·¾³±äÁ¿½øÐÐÅäÖã»ÄÇôºóÃæµÄÅäÖûáÓ°ÏìÇ°ÃæµÄEclipseµÄÅäÖÃÂð£¿
Çë´ó¼Ò¶àÖ¸½Ì~£¡Ð»Ð»£¡
²»»á°Ñ£¬ÎÒÕâ¶¼×°Á赀 ÎÒϵͳÀï »¹×°ÁË ......
ÎÒÏÖÔÚÓÃstruts2¿ò¼Ü,ÐèҪʹÓÃajaxʵÏÖ¾Ö²¿Ë¢Ð£¬µ«ÊÇ´ÓÈÝÆ÷Àï·µ»ØµÄÖµ²»ÖªµÀÔõô´Óstruts.xmlÅäÖÃÎļþÀïÓ³Éäµ½jspÒ³ÃæÀÒÔǰservletÀïдout.orint("xxxxx")¾Í¿ÉÒԵõ½~£¬µ«ÊÇÏÖÔÚÓÃstruts¾Í²»ÖªµÀÔõôР......
Ôõô¼àÌýJTextFieldµ¥ÐÐÎı¾µÄ±ä»¯ÄØ£¿
Ò²¾ÍÊÇÔõôͨ¹ý¡°±£´æ¡±°´Å¥»ñÈ¡ÐÂÊäÈëÔÚÎı¾ÇøµÄ×Ö·û´®ÄØ£¿
ÔÚÏߵȴý£¡£¡
JFrame ap = new JFrame("");
ap.setDefaultCloseOperation(JFrame.DISP ......
ÓÃjava ·¢ÐÅʱ£¬³öÏÖÏÂÊö´íÎó
Could not connect to SMTP host: mail.infoscience.co.jp, port: 25, response: -1
Çë½Ì¸÷λ
¶Ë¿Ú´íÎó
telnet XXX 25
½á¹û£º220 ofmipd.local ESMTP
ÊÇʲ麼Òâ˼? ......