Author of ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- OCPJP Online Training -- Twitter -- How to Ask a Question
Author of ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- OCPJP Online Training -- Twitter -- How to Ask a Question
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Stole Perov wrote:So, just to make it clear that i understood.
dos.writeInt(data.length); == write to the "buffer" the value of the data array.[do not send the buffered data]
dos.write(data); == add to the "buffer" the whole data array.[do not send the buffered data]
dos.flush(); == send to the output socket the following buffered data [data.length, data[]]
so, for example, if data.length = 2 and data[0] = 1 and data[1] = 3 then the output to the outgoing buffer would be 2,1,3
right?
and, what does "int length = dos.readInt();" means. Measure the length of the received stream or read the first integer from the stream.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions