Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将 cmis 文档转换为字节流,以与使用 byte[] 的项目特定请求构造函数同步,从文件类型对象转换是可以的,但转换 cmis 文档是我没有得到的。
如果您使用的是 Java 9 或更高版本,则可以这样做。
Document doc = ...; InputStream stream = doc.getContentStream().getStream(); byte[] bytes = null; try { bytes = stream.readAllBytes(); } finally { stream.close(); }