Are you complicating your own life? If you really want to save an object and bring it back later on, you can make it serilizable. However, Socket is not a serilizable object, you cannot save it. After all, I think the only reason a person want to "save" a socket is because he doesn't know what he is doing.
用这个可以保存了
但要想再让它变成原来的类型怎么转换呀??
的实现类(如java.util.Vector),用的时候再取出来