read and write for dbuff