public void setDocument(Document doc) {
        buffer = null;
        decoder = null;
        document = doc;
        lastModified = document != null && document.getLastModified() != null ? document.getLastModified() : 0;
    }
Sets the document of this reply.

@param doc The document to set.
documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/GetDocumentReply.java