use of org.jkiss.dbeaver.model.data.storage.BytesContentStorage in project dbeaver by serge-rider.
the class DBDDocumentContentProxy method updateDocument.
@Override
public void updateDocument(@NotNull DBRProgressMonitor monitor, @NotNull InputStream stream, Charset charset) throws DBException {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ContentUtils.copyStreams(stream, -1, baos, monitor);
content.updateContents(monitor, new BytesContentStorage(baos.toByteArray(), charset));
document.updateDocument(monitor, new ByteArrayInputStream(baos.toByteArray()), charset);
} catch (IOException e) {
throw new DBException("Error transforming XML document", e);
}
}
Aggregations