use of com.ibm.designer.domino.napi.NotesNote in project org.openntf.nsfodp by OpenNTF.
the class DarwinoNCompositeData method writeJavaScriptLibraryData.
@Override
public void writeJavaScriptLibraryData(OutputStream os) throws IOException {
try {
// TODO figure out why the Darwino implementation chops data
// https://github.com/OpenNTF/org.openntf.nsfodp/issues/271
// this.data.writeJavaScriptLibraryData(os);
long dbHandle = this.note.getParent().getHandle();
NotesSession notesSession = new NotesSession();
try {
NotesDatabase notesDatabase = notesSession.getDatabase((int) dbHandle);
NotesNote notesNote = notesDatabase.openNote(this.note.getNoteID(), 0);
FileAccess.readFileContent(notesNote, os);
} finally {
notesSession.recycle();
}
} catch (NotesAPIException e) {
throw new NDominoException(e.getNativeErrorCode(), e);
} catch (DominoException e) {
throw new NDominoException(e.getStatus(), e);
}
}
Aggregations