求好手点拨一个Java的Socket通信程序的故障原因.

求高手点拨一个Java的Socket通信程序的故障原因...
高手,您好:
    我在写一个Java的通信程序,我进行了我的一个“Lib类”中的写出方法和读入方法的测试,测试代码如下:
    (C端)
    
package s;

import java.io.DataOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.net.UnknownHostException;

public class C_port {
Socket s = null;
OutputStream outputstream = null;
public C_port(){
try {
s = new Socket("127.0.0.1",60000);
outputstream = new DataOutputStream(s.getOutputStream());
} catch (UnknownHostException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String str = "CJ必胜!!CJCO!!CJHMF,这个问题解决了,我高兴了,现在我们的群里,加入了182个人\r\n我们群里的人,都决心互相学习,增长本领";
Lib.write(s, str);
}

public static void main(String[] args){
new C_port();
}

}

    (上文中的第24行代码的Lib类的write方法,是我要测试的“系统读写功能的一个环节”..)
    (S端)
    
package s;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class S_port {
String str = "";
ServerSocket s =null;
Socket so = null;
S_port(){
try {
s = new ServerSocket(60000);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
while(true){
try {
so = s.accept();
SystemThread m1 = new SystemThread(so);
m1.start();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

public static void main(String[] args){
new S_port();
}
}

    (上文中S端的的第21行的SystemThread子线程类,他的源代码如下:)
     
package s;

import java.io.DataInputStream;
import java.io.InputStream;
import java.net.Socket;

public class SystemThread extends Thread{
Socket so = null;
DataInputStream dips = null;
InputStream inputstream = null;
String str = null;

public SystemThread(Socket s){
so = s;
}

public void run(){
String str0 = Lib.readsocketUTF(so);
        System.out.println(str0);
}
}

    (上文中的第18行代码的“Lib类的readsocketUTF()方法”是我要测试的“系统读写功能”的另外一个环节..)
     上文中的Lib类,我在我的项目中的两个端点,都进行了“配置”..
    (Lib类的代码如下:)
    
package s;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.net.Socket;

public class Lib {
    static InputStream is = null;
    static OutputStream outputstream = null;
    static String MyKey = "CJCO5882";
    static PrintStream ps;
    static BufferedReader br;
static String buffer0;
static OutputStream os = null;
static byte[] readbuf = null;
static byte[] writebuf = null;
static BufferedInputStream bis = null;
static BufferedOutputStream bos = null;
static int num  = 0;
static String str = "";
    
static String readsocketUTF(Socket s){
        String info = "";
         try {
is = s.getInputStream();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
try {
str = br.readLine();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
info = Systemcrypt.HloveyRC4(str,MyKey);
        return info;
    }

static void write(Socket s,String str0){

System.out.println("接受到一个客户端消息:" + s);