The Byte Stream Classes

Byte streams are defined by using two class hierarchies. At the top arc two abstract classes: Input Stream and Outputting. Each of these abstract classes has several concrete sub classes, that handle the differences between various devices, such as disk files, network.connections, and even memory buffers. The byte-stream classes are shown in Table 12-1. A few of these classes are discussed later in this section. Others are described in Part n. Remember, to use the stream classes. you must import aviation The abstract classes Input’Stream and Outfitter define several key methods that the other stream classes implement. Two of the most important are ad and writer ), which, respectably, read and write bytes of data. 3 methods are declared ,as abstract inside Input tram and Bloodstream. They are overridden by I stream classes.

The Character Stream Classes

Character streams are using two class hierarchies.At the top Me two abstract classes, Reader and Writ(!1′.These abstract classes handle Unicode character streams. Java has several concrete sub classes of each of these. The html team classes are shown. The abstract classes Reader and Rangefinder several key methods that weatherstripped classes implement. Two of tile most important methods arc ready ) and write I, which read and write characters of data, respectively. These methods are overridden by. derived’ stream classes.

[vfb id=1]

Share This