foo = bar.addFile("foo.html", "contents of foo");
foo.setLastModified(LAST_MODIFIED.getTimeInMillis());
}
private String getDocumentContents(Document doc) throws RepositoryException, IOException {
BinaryValue val = (BinaryValue) Value.getSingleValue(doc, SpiConstants.PROPNAME_CONTENT);
InputStream in = val.getInputStream();
byte[] buf = new byte[BUF_SIZE];
int pos = 0;
int len = in.read(buf, 0, BUF_SIZE);
while (len != -1) {
pos += len;