Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions

Question

Why is evaluating training an important part of strategic training?

Answered: 1 week ago