Data encapsulation, also known as data hiding, is the mechanism whereby the implementation details of a class are kept hidden from the user. The user can only perform a restricted set of operations on the hidden members of the class by executing special functions commonly called ''methods'' to prevent attributes of objects from being easily viewed and accessed. '''Data encapsulation''' may refer to:
'''Data encapsulation''' can mean:
*Hidden information that cannot be seen without any call of them
* the wrapping of private data in classes in object-oriented programming languages: see [[information hiding]] and [[separation of concerns]] ▼
* [[protocol layering]] in communications protocol design
▲* theThe wrapping of private data in classes in object-oriented programming languages: see [[Encapsulation (computer programming)]], [[information hiding]] and, [[separation of concerns]]
* The wrapping of network data by a lower layer in the [[OSI model]] into a single unit where a higher layer can extract the relevant data: see [[Encapsulation (networking)]]
When a host transmits data across a network to another device, the
{{Disambiguation}}
data is encapsulated with protocol information at each layer of the OSI model.
Each layer communicates only with its peer layer on the receiving device.
To communicate and exchange information, each layer uses what are called
Protocol Data Units (PDUs). These hold the control information attached to
the data at each layer of the model, which is typically attached to the header
of the data field but can also be in the trailer, or end of the data field.
Each PDU is attached to the data by encapsulating it at each layer of the
OSI model. Each PDU has a specific name depending on the information
each header has. This PDU information is only read by the peer layer on the
receiving device and then is stripped off and the data is handed to the next
upper layer.
{{Uncategorized|date=November 2008}}
|