InputStream stream = new FileInputStream("P:\\leng-bot\\image\\文件名.png"); MessageContentBuilder builder = builderFactory.getMessageContentBuilder(); MessageContent content = builder.image(stream).build(); sender.SENDER.sendPrivateMsg(privateMsg.getAccountInfo().getAccountCode(), content);
当使用InputStream进行图片消息构建发送时报错java.lang.IllegalArgumentException: he img has no source in [CAT:image,type=stream]
InputStream stream = new FileInputStream("P:\\leng-bot\\image\\文件名.png"); MessageContentBuilder builder = builderFactory.getMessageContentBuilder(); MessageContent content = builder.image(stream).build(); sender.SENDER.sendPrivateMsg(privateMsg.getAccountInfo().getAccountCode(), content);
当使用InputStream进行图片消息构建发送时报错java.lang.IllegalArgumentException: he img has no source in [CAT:image,type=stream]