What exactly is a byte stream? | SoloLearn: Learn to code for FREE!

+1

What exactly is a byte stream?

I mean is it just a stream of bytes with each byte containing 8 bites or something else? Furthermore, how does it fits in the statement "when we say serializing and deserializing objects". Any example would be very much helpful :)

9/2/2019 2:16:20 PM

Ashish

1 Answer

New Answer

0

A byte stream is a stream that can be written to a file or sent over UDP or TCP. For instance I could create a class and serialize (convert into bytes) the object. From here we send it over TCP to the receiver. The receiver then deserializes the object. (Both sender and receiver have references to the same set of serializable objects). In short a byte stream is a flow of bytes that can be read from.