O'Reilly logo

Object-oriented Programming Using C++ and Java by Anand Vasappanavara, Gautam Vasappanavara, Ramesh Vasappanavara

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

21

Java IO Files

LEARNING OBJECTIVES

At the end of the chapter, you will be able to understand and program

  • Concepts of Streams and Stream classes.
  • Use InputStream and OutputStream.
  • Random file handling.
  • File IO and Errors and Exception in File IO.
  • Handling of primitive data types with DataInputStreams & DataOutputStreams.
  • Read objects from and write objects on to a file.
  • Object Streams and Piped Streams.

21.1 Introduction

We have all heard about streams of water; we call them springs flowing from top of hills to plains. In Java, flow of data from output device to computer system and computer to any one of the output devices is called Stream or IO streams.

This chapter will introduce you to concepts of IOStreaming and stream classes like ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required