Abstract
With all our programs so far, there has been a very fundamental limitation: all data accepted is held only for as long as the program remains active. As soon as the program finishes execution, any data that has been entered and the results of processing such data are thrown away. Of course, for very many real-life applications (banking, stock control, financial accounting, etc.), this limitation is simply not realistic. These applications demand persistent data storage. That is to say, data must be maintained in a permanent state, such that it is available for subsequent further processing. The most common way of providing such persistent storage is to use disc files. Java provides such a facility, with the access to such files being either serial or random. The following sections explain the use of these two file access methods, firstly for non-GUI applications and later for GUI applications. In addition, the important and often neglected topic of serialisation is covered.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsAuthor information
Authors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag London
About this chapter
Cite this chapter
Graba, J. (2013). File Handling. In: An Introduction to Network Programming with Java. Springer, London. https://doi.org/10.1007/978-1-4471-5254-5_4
Download citation
DOI: https://doi.org/10.1007/978-1-4471-5254-5_4
Published:
Publisher Name: Springer, London
Print ISBN: 978-1-4471-5253-8
Online ISBN: 978-1-4471-5254-5
eBook Packages: Computer ScienceComputer Science (R0)