String ipAddress = new String (pktIn.getData(),0,pktIn.getLength());
what the mean of this sentence??

Recommended Answers

i put that to the google, but nothing

really I do't know, nothin with ipv4/ipv6, maybe someone knows

but today is still Fri 13th.

Jump to Post

It's just constructing a string "ipAddress" from the bytes in the packet using this String constructor: String(byte[] bytes, int offset, int length)

Jump to Post

All 6 Replies

i put that to the google, but nothing

really I do't know, nothin with ipv4/ipv6, maybe someone knows

but today is still Fri 13th.

What class is the pktln variable?

ya i google it but i didnt find anything 2...anyway thanx:)

What class is the pktln variable?

DataGramPacket pkt

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.