Base class for objects that can read and write text lines