File size
Opened this issue · 0 comments
djethrak commented
Sending a small file is going through well, but sending large files like music files is not going at all.
The byte is not sending correctly.
Here is my code to receive large file
if (isFirstValue){
isFirstValue=false;
if (readMessage.length() > 4)
{
totalNumberOfString = Integer.parseInt(readMessage.substring(0, 4));
allImportValue = allImportValue+readMessage.substring(4);
DEL+=readMessage.length();
setState(totalNumberOfString+"");
}
}
else {
allImportValue = allImportValue+readMessage;
DEL+=readMessage.length();
if (totalNumberOfString==allImportValue.length()){
isFirstValue=true;
setState(allImportValue);
RecieveTxt(allImportValue);
RecieveDemox(allImportValue);
allImportValue = "";
totalNumberOfString=0;
}
}