Question: what does this code doing and what it mean? In detail description. while ((fromClient = in.readLine()) != null) { if (fromClient.startsWith(FileName)) { System.out.println(fromClient); fileName =

what does this code doing and what it mean? In detail description.

while

((fromClient = in.readLine()) != null)

{

if (fromClient.startsWith("FileName"))

{

System.out.println(fromClient); fileName = fromClient.split(":")[1]; System.out.println("File name from client is: "+fileName); fileName ="OnServer_"fileName;

System.out.println("File name being saved is: "+fileName);

}

try

{

byte [] decode = Base64.getDecoder() .decode(fromClient); Files.write(Paths.eget(fileName) , decode);

System.out.println("File saved.");

System.out.println("File Bytes[] "+fromClient);

successCounter++;

System.out.println("success: "+successCounter);

)catch (Exception e)

{

System.out.println(e);

}

if(successCounter==5)

{

System.out.println("Bye.");

System.out.println("Bye.");

System.out.println("Bye.");

System.out.println("Bye.");

System.out.println("Bye.");

System.out.println("Bye.");

System.out.println("Bye.");

break communicationLoop;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!