import java.io.*;
public class Piped { public static void main(String[] args) 
{
try{
Sender se=new Sender();
Recever re=new Recever();
PipedOutputStream out=se.getout();
PipedInputStream in=re.getin();
out.connect(in);
se.start();
re.start();
}
catch(Exception e)
{
e.getMessage();
} }


class Sender extends Thread
{
private PipedOutputStream out=new PipedOutputStream();
public PipedOutputStream getout()
{
return out;
}
public void run()
{
String s="eeeee";
try
{
out.write(s.getBytes());
out.close();
}
catch(IOException e)
{
e.getMessage();
}
}

}

class Recever extends Thread
{
private PipedInputStream in=new PipedInputStream();
public PipedInputStream getin()
{
return in;
}
public void run()
{
try
{
Thread.currentThread().sleep(200);
}
catch(Exception e)
{}
byte[] b=new byte[1222];
int i=0;
try
{
i=in.read(b);
System.out.print(new String(b,0,i));
in.close();
}
catch(IOException ee)
{
ee.getMessage();
}
}

}}
这哪里错了