def METHOD_NAME(self, s):
    if self.closed:
        raise ValueError, "I/O operation on closed file"
    if not s: return
    if self.pos > self.len:
        self.buflist.append('\0'*(self.pos - self.len))
        self.len = self.pos
    newpos = self.pos + len(s)
    self.db.put(self.key, s, txn=self.txn, dlen=len(s), doff=self.pos)
    self.pos = newpos