请告诉我应该如何处理这段代码,我即将将字节数据转换为 base64 字符串。下面的代码只会将图像文件转换为输入流,我不知道如何将其转换为 base64。
var MyView:NotesView = database.getView("uploadforms");
var uploadPhoto:NotesDocumentCollection = MyView.getAllDocumentsByKey("uploadphoto");
var input:java.io.InputStream = uploadPhoto.getFirstDocument().getAttachment("photo").getInputStream();
var data = -1;
var myArray = new Array();
while ((data = input.read()) != -1) {
}