0% found this document useful (0 votes)
13 views

Unit 4 Java

Java programming notes

Uploaded by

sanikajk06
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
13 views

Unit 4 Java

Java programming notes

Uploaded by

sanikajk06
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 11
jor : Networking Basica PEC CLEeS CL [Jove | Fetworting | va >a eoncepl Gl) are e bog more comp utintg dei cad bog er +6 Hr GS Ut” | Can Shaw resdurcw: : Advantage» 1) Shasting rexoUrces - _) Cnretizea Management + : Soptwasee “4 = tw Jowa nut Packages support Uw “proto cal LV AICP Cronsmission Conpol Proto cet) Peete LN UDP + (Uses Datagram Protocat) ° Socret : Endpoint belween two UWIAY CAPOMNUNI Cation , > | dave Socket Programming provided a fedUly te Shave dala. bélwveen oUF HGLeh YE Comp uctirg oteu ican. = 6 S1 Modet- 4 | Appucabiesy d PEN TALI < | Seasrory Su ~ TRANS po at, — i | Newoe Sel ~ | Dato~ Unt Vue > yi Cad pe so ee Ha = a o-1023 WW-thown pe SFsS 2 tog = 8s) Regi sty - 4g iIS2- 658 3g = proto cal chou MAM “ ~~ a 4 ‘ a EAP hoo . Sy : — SSH 7 et kt 4 ~~ sme | —-_| Time | —~_ | __whots 4 —~_. Erma. ~ p= ATTP q POPS NWTP y IMAP. g Tt _j— J lem bq ishy 1094 | I : ips owed Oramplr COOK 443 }bleg favticle | L cannes sept eomany PAD eeu i 4 ——_ 4 —— tp iowa ex armple-Co uk 443/ coor mele nee a i+ oo log [articte/search? docid 2 Dorh] -enttday one" _ Sve Gores port queut Fragrant | eri S604 J re Sepaarer | ——™4__ ert can Haan 4 Quy PyRt 4 re resourced | rR ‘den HH D vexourcal ON | nt TUL » fate wry UO vor =a pot ep red of CLOSING, TE class Huse ince bye a thal Cond a J dai cas 2 [ a a | = ail Proxy SOSH oe 7 | Jawa: ner: inetAdd ross + Provickes moMmods te gu addy | any norname I a4 © | InetAddscedd: tht InuAddsera Class has dhe Mobility % Greate Objects clirectly sane fa ctery mathods au a wed for he pusrpore- Factory momo as riatic mutnods Wo cars tat retuHn on object hat cow ® 1 [Fact methods: C a t at i) public oratic (netAdcscess gerlocaliert@) Hho wt C a UntnowDH oLtEycep tren ( (I public Static TnerPddseess 9U8y Name (ining new) | nyo wt Unienowsn Hou y cep tien - “19 PUbUE stagi¢ Tru Adeeb C7 gua Byam (HIG | j hosiNare) Hyyows UREho WNHOLt Except ow. a liv vy) pubuc stove | (nuded LCL) QU By Adclrens (srry “hoWome sbyttlP Aacteias TI hews c Fim CAA HA Id Fyre nsioan “\enpor ‘youd net 5 Tetons Inet rAddreds test Fo ___ public S$ Steuke Vord sour) (Shaw row S$ Uno wn HoLtEx cepuim ov wnurhddrers Addryeay = InetAddra. gulocalions). Sy STI) out PriNHN(Addiers); _ os Aeloread * Inu Dddreas. garByNam (“4009 lL: orn’); Sy stim oul: prinkin (Add ); o inet Addrem SW T= (nethddrem guAliByName CY ww. Yahoo - com") 5 a tes (NE 1 =O; 1 MarQuenw) + Specity — p ENO WHI Ques [engrh of mar Gurue _ L, (some errors J 1 - Nn CeyvenSockos Cimt port mavguenes Inet Aa rerd : wea ddsuns ) + speerty part witha qusre : gn oh mak duos * For multi-nomed horu , brs Cat Adveoss fpetl tren Wr Ip choleliend 1 UTLEY “thy 70W98 ‘ i. char'a Sigs maaet loeycepnon | Lar general TIO eyyoy SOOT CORSA eo oe - ee a ee | ie a 1m Lv y accept ye hocks F wart joe | pe ONcL connectteOn 4Y made | ey ech f Satan public Socket accepl0) SEE OEY cep tm * 1 accept aeons acter cann ~ seventer p oo Gi) cox O a ~ Qi) 9U Inu Bd cass: — I els Su ot Gy) gtttocat Port 7 A ee ( ; : ; 2 % | URL (Uniform Eusource Locator ): py — Dt Vo LheNndosxeoti2d Loray to UW 5 idsntty and locate resources on Hho tntuu e ORL Gap : 7 c 3 (50) Host Mamer or [P Add seuss IV) povt Numba a jv) AX posh. Gees if cad ——__ _*_, UNnS bude: ——_ (URL mig oriSpecrtien ] 8 JUD) veel Siang portame reining mestna 21 Sr paar J nesiname \mporl \Warnet hy import jwa-io.g 5 | public clars LowPort scamman _pubit Slate Vond moun (Shing Carga) { _ String host = “Wet host”, fee Cnt lel t< 1024; ine) 7 i n by Ff 4 Socket 9+ nao Soceet Chock 1); Systm out’ PAMHN (* THe W a Server oY port +; + of % #host), i CUD Lnown HouexcepHon break ; i carch COR Keepin ey ) —jSmpo rt jowa-to-Writoe; “inoport_joud net: SexuenSockee j Import fava. net So chet IMpork Jawa-io. (Ol xeepU, Limpert java.io OuspasS hear Wve 4 public Class Sinnpu Sev vet t yo purbuc ae mam (ining angst) § eu Serversocret servers naeo Server Socket (SPIE) WwW le Ctrur ) % : Socket Connect WS: server accep b CU; ° ~ | try 3 ~ Loritey out > Rew OUFPUES Pam Wy itr aa | Cromnection. getOutputShream () ); $. OUL Lovite (“You've Connected bo NU cesuen. . ~ bye-bye no wo: lel nn); Pa out uth 0); oie connec « CLO (); Lcosch COException oy) } + ° 2. ( . t —_ —_ * {| ——— te ee —

You might also like