Remove obsolete function in Packet class

Add check on read and write in Packet class
Add Rewind function and Cursor propertie in Packet class