Byte stream

From Wikipedia, the free encyclopedia

A byte stream is an abstraction used in computer science to describe a particular kind of communication channel between two entities. In computer networking the word octet stream is sometimes used to refer to the same thing.

Formally, it is a channel (often bidirectional, but sometimes unidirectional) down which one entity can send a sequence of bytes to the entity on the other end. In almost all instances, the channel has the property that it is reliable; i.e. the exact same bytes emerge, in the exact same order, at the other end.

Less formally, one can think of it as a conduit between the two entities; one entity can insert bytes into the conduit, and the other entity then receives them.

One well-known example of a communication protocol which provides a byte-stream service to its clients is the Transmission Control Protocol of the Internet protocol suite, which provides a bidirectional 8-bit byte stream; it is being used to bring you this Web page. The pipe mechanism used in a number of operating systems, such as Unix and DOS, is a unidirectional byte stream.

The Internet media type for an arbitrary byte stream is application/octet-stream.

[edit] See also