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();
沒有留言:
張貼留言
留個話吧:)