ContentWriter contentWriter = contentService.getWriter(nodeCurrentLogFile, ContentModel.PROP_CONTENT, true);
contentWriter.setMimetype("text/plain");
FileChannel fileChannel = contentWriter.getFileChannel(false);
ByteBuffer bf = ByteBuffer.wrap(logLine.getBytes());
fileChannel.position(contentWriter.getSize());
fileChannel.write(bf);
fileChannel.force(false);
fileChannel.close();
星期三, 6月 27, 2012
[Alfresco ] How to update content with ContentWriter class
此問題欲解決要利用ContentWriter變更Node的內容,
不是指新增版本的方式,目前尚未用到,待驗證 :)
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言
留個話吧:)