Thread: [Solved] Socket Problem
View Single Post
tpr
Junior Member
Join Date: Aug 2014
Location: where my heart is
Old 01-21-2022 , 16:47   Re: Socket Problem
Reply With Quote #2

i solved this by reading the output by bytes

here is the code for who has this problem :

InputStream is = socket.getInputStream();

byte[] buffer = new byte[1024];
int read;
while((read = is.read(buffer)) != -1) {
String output = new String(buffer, 0, read);
System.out.print(output);
System.out.flush();
};
__________________
Mireda
tpr is offline