Hi, I'm kind of new to the world of streams in Java, and I was wondering - I have this Server/Client program, and I need to read Objects and Text streams. I tried making an ObjectInputStream, and a PrintWriter out of the Socket's InputStream, but when I tried to read from the stream, it said that I was reading the wrong type of data from the Stream. I need to pass the Strings through because it takes less time to send those than it does objects. I fixed it so it sends the String as an object, but I need it to send the string, because it is faster and my program is starting to lag.
If anyone knows of a solution to this problem, please let me know.