Skip to content
Advertisement

how to implement ByteArrayOutputStream?

I need help with implementing an byteArrayOutputStream that stores the output from the server, which I can then read from and print. Does anyone know how to do this? Any help would be much appreciated.

TCPAsk:

JavaScript

Edit: my code is now working and it is similar to the answer (TCPClient) given below with some minor additions. ByteArrayOutputStream is not needed.

Advertisement

Answer

You didn’t send the user data to the server. Just modify TCPClient like this:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement