资源描述:
《就业招聘信息发布管理系统java英文翻译》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、沈阳航空工业学院毕业设计(论文)TheJavaI/OSystemCreatingagoodinput/output(I/O)systemisoneofthemoredifficulttasksforthelanguagedesigner.Thisisevidencedbythenumberofdifferentapproaches.Thechallengeseemstobeincoveringalleventualities.NotonlyaretheredifferentsourcesandsinksofI/Othatyouwanttocommunica
2、tewith(files,theconsole,networkconnections,etc.),butyouneedtotalktotheminawidevarietyofways(sequential,random-SQLServer2000,buffered,binary,character,bylines,bywords,etc.).TheJavalibrarydesignersattackedthisproblembycreatinglotsofclasses.Infact,therearesomanyclassesforJava’sI/Osys
3、temthatitcanbeintimidatingatfirst(ironically,theJavaI/Odesignactuallypreventsanexplosionofclasses).TherewasalsoasignificantchangeintheI/OlibraryafterJava1.0,whentheoriginalbyte-orientedlibrarywassupplementedwithchar-oriented,Unicode-basedI/Oclasses.InJDK1.4,thenioclasses(for“newI/
4、O,”anamewe’llstillbeusingyearsfromnow)wereaddedforimprovedperformanceandfunctionality.Asaresult,thereareafairnumberofclassestolearnbeforeyouunderstandenoughofJava’sI/Opicturethatyoucanuseitproperly.Inaddition,it’sratherimportanttounderstandtheevolutionhistoryoftheI/Olibrary,evenif
5、yourfirstreactionis“don’tbothermewithhistory,justshowmehowtouseit!”Theproblemisthatwithoutthehistoricalperspective,youwillrapidlybecomeconfusedwithsomeoftheclassesandwhenyoushouldandshouldn’tusethem.ThischapterwillgiveyouanintroductiontothevarietyofI/OclassesinthestandardJavalibra
6、ryandhowtousethem.TheFileclassBeforegettingintotheclassesthatactuallyreadandwritedatatostreams,we’lllookatautilityprovidedwiththelibrarytoassistyouinhandlingfiledirectoryissues.TheFileclasshasadeceivingname;youmightthinkitreferstoafile,butitdoesn’t.Itcanrepresenteitherthenameofapa
7、rticularfileorthenamesofasetoffilesinadirectory.Ifit’sasetoffiles,youcanaskforthatsetusingthelist( )method,whichreturnsanarrayofString.Itmakessensetoreturnanarrayratherthanoneoftheflexiblecontainerclasses,becausethenumberofelementsisfixed,andifyouwantadifferentdirectorylisting,you
8、justcreateadifferentFileobject.In