February 27, 1998

Object I/O

Question: How can i add many java objects to a file then retrieve them as Java objects from the file? Answer: Java 1.1 introduced a concept called serialization. Serialization isa method of turning Java objects into a stream of bytes and a streamof bytes back into Java objects. You should

Constant pointers

There are cases when you need to define a constant pointer to a variable/object; for instance, when taking a function address, or when you want to protect a pointer from unintended modifications such as assignment of new address, pointer arithmetic, etc. In fact, an object

Namespaces are open

Unlike structs, classes, enums, and unions, the enclosing brace of a namespace definition does not prohibit you from further extensions to that namespace. A namespace can be extended this way: //file proj_classes.hnamespace MyProj { class RealTimeEncoder{ //../}; class NetworkLink { //… }; class UserInterface { //… };};//file proj_const.hnamespace MyProj {