Skip to main content

Working with Files

  • Chapter
  • First Online:
  • 3329 Accesses

Abstract

In this chapter, we will explain the following:

  • The difference between text files and binary files

  • The difference between internal and external file names

  • How to write a program to compare two text files

  • The try...catch construct

  • How to perform input/output with binary files

  • How to work with a binary file of records

  • What are random access files

  • How to create and retrieve records from random access files

  • What are indexed files

  • How to update a random access file using an index

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   59.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Noel Kalicharan

About this chapter

Cite this chapter

Kalicharan, N. (2014). Working with Files. In: Advanced Topics in Java. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-6620-4_7

Download citation

Publish with us

Policies and ethics