marklogic - Read and write using DocumentMetadataHandle and InputStreamHandle -


trying read document 1 location , write different location. using documentmetadatahandle metadata , inputstreamhandle read content. write when use same inputstreamhandle used read throwing stream closed exception. same not happening when don't use documentmetadatahandle in read. code below. using java client api 3.0.7

xmldocumentmanager documentmanager = client.newxmldocumentmanager(); transaction transaction = client.opentransaction(); inputstreamhandle handle = new inputstreamhandle(); documentmetadatahandle metadatahandle = new documentmetadatahandle(); documentmanager.read(uri, metadatahandle, handle,transaction); documentmanager.write(newuri, metadatahandle, handle, transaction); 

if want buffer document in memory writing server, might consider using byteshandle instead of inputstreamhandle.

documentmetadatahandle buffer metadata.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -