Download presentation
Presentation is loading. Please wait.
1
Input Output Eriq Muhammad Adams J eriq.adams@ub.ac.ideriq.adams@ub.ac.id | http://eriq.lecture.ub.ac.idhttp://eriq.lecture.ub.ac.id
2
* Java packages involved with I/O * I/O Stream * File I/O * Demo * References
4
* Reading I/O stream * Writing I/O Stream
5
* Byte Streams, to perform input and output of 8-bit bytes
6
* Byte Streams illustration
7
* Character Streams, Character stream I/O automatically translates this internal format to and from the local character set.
8
* Line Oriented I/O, reading streams line by line
9
* Scanning, Objects of type Scanner are useful for breaking down formatted input into tokens and translating individual tokens according to their data types.
10
* File is a class that helps you write platform-independent code that examines and manipulates files and directories. * File’s method
11
* Manipulating Files delete(), delete file immediately deleteOnExit(), delete file when exit from virtual machine setLastModified(), set modification date/time of file renameTo(), renames file * Working with Directories mkdir(), create a directory list() and listFiles(), list the contents of a directory * Static Methods createTempFile(), creates a new file with an unique name and returns a File object listRoots(), returns a list of file system root names.
12
* I/O Demo in IODemo.zipIODemo.zip
13
* Just Java 2, Sixth Edition, Addison Wesley * Java Tutorial 4 th Edition, Addison Wesley
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.