java - How to receive base64 conversion [audio file] through TCP/IP with less seconds? -


case: 2 different linux machine. client machine running on 'c'programming , sever receiving machine running on java.

my code:

appendedlen  = "2687868"; int lengthtocheck= infromclient.read(ch, 0, ch.length);    while (appendedlen >= lengthtocheck) {     request = request + string.valueof(ch).trim();      if ((appendedlen - lengthtocheck) != 0) {         ch = new char[appendedlen - actuallen];         actuallen = infromclient.read(ch, 0, ch.length);          lengthtocheck = lengthtocheck + actuallen;     } else {         (" received entire response");         break;     } } 

for receiving, take 6-7 mins.

get inputstream socket , use apache commons read byte[] follows

ioutils.tobytearray(inputstream) 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -