When using serial communication, allow the user to specify any Stream object, rather than hard-coding "Serial". This will make your library compatible all serial ports on Mega and the Due, and can also use alternate interfaces like SoftwareSerial. The Stream object can be passed to your library's constructor or to a begin() function (as a reference, not a pointer). See Firmata 2.3 or XBee 0.4 for examples of each approach.
When writing a library that provides byte-stream communication, inherit Arduino's Stream class, so your library can be used with all other libraries that accept Stream objects. If possible, buffer incoming data, so that read() immediately accesses data the buffer but does not wait for more data to arrive. If possible, your write() method should store data to a transmit buffer, but write() must wait if the buffer does not have enough space to immediately store all outgoing data. The yield() function should be called while waiting.
From https://www.arduino.cc/en/Reference/APIStyleGuide: