西安电子科技大学软件学院《Java程序设计》讲义刘惠TheJavaI/OSystem
西安电子科技大学软件学院《Java程序设计》讲义刘惠OutlineWhat’sStream?ClassificationofStreamInputStreamOutputStreamReaderWriterWhat’sFilter?(VariouskindsofFilter)FileClassOffbyitself:RandomAccessFileTypicaluseofI/OStreams
西安电子科技大学软件学院《Java程序设计》讲义刘惠What’sStream?importjava.io.*;JavaI/OisbasedonStreamI/Olibrariesoftenusetheabstractionofastream,whichrepresentsanydatasourceorsinkasanobjectcapableofproducingorreceivingpiecesofdata.ThestreamhidesthedetailsofwhathappenstothedatainsidetheactualI/Odevice.
西安电子科技大学软件学院《Java程序设计》讲义刘惠StreamPicture
西安电子科技大学软件学院《Java程序设计》讲义刘惠ClassificationofStream
西安电子科技大学软件学院《Java程序设计》讲义刘惠Differencebetween
Reader/Writer/IputStream/OutputStream1)theInputStreamandOutputStreamclassesstillprovidevaluablefunctionalityintheformofbyte-orientedI/O,whiletheReaderandWriterclassesprovidepliant,character-basedI/O.
西安电子科技大学软件学院《Java程序设计》讲义刘惠Differencebetween
Reader/Writer/InputStream/OutputStream2)ThemostimportantreasonfortheReaderandWriterhierarchiesisforinternationalization.TheoldI/Ostreamhierarchysupportsonly8-bitbytestreamsanddoesn’thandlethe16-bitUnicodecharacterswell.SinceUnicodeisusedforinternationalization(andJava’snativecharis16-bitUnicode),theReaderandWriterhierarchieswereaddedtosupportUnicodeinallI/Ooperations.
西安电子科技大学软件学院《Java程序设计》讲义刘惠TypesofInputStreamInputStream’sjobistorepresentclassesthatproduceinputfromdifferentsources.Thesesourcescanbe:
Anarrayofbytes.AStringobject.Afile.A“pipe”
西安电子科技大学软件学院《Java程序设计》讲义刘惠TypesofOutputStreamThiscategoryincludestheclassesthatdecidewhereyouroutputwillgo:anarrayofbytesafilea“pipe
西安电子科技大学软件学院《Java程序设计》讲义刘惠TypesofReaderWriterAtableshowstheComparebetweenInputstreamReader,OutputStreamWriter。
西安电子科技大学软件学院《Java程序设计》讲义刘惠Filter(Byte
原创力文档

文档评论(0)