What exactly is a byte stream? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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 :)

2nd Sep 2019, 2:16 PM
Ashish
Ashish - avatar
1 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.
8th Sep 2019, 10:26 PM
John
John - avatar