Examples of retrieveContentAsStream()


Examples of eu.planets_project.ifr.core.storage.impl.jcr.JcrDigitalObjectManagerImpl.retrieveContentAsStream()

      DigitalObject object = jcrDo.retrieve(new URI(id), false);     
      for(Metadata md : object.getMetadata()) {
        if(md.getName() != null && md.getName().equals(MIME_TYPE_METADATA_NAME))
          response.setContentType(md.getContent());
      }     
      is = jcrDo.retrieveContentAsStream(object.getPermanentUri());
     
      // read from input stream and write to client
      int bytesRead = 0;
      byte[] buffer = new byte[BUFFER_SIZE];
      while((bytesRead=is.read(buffer))!=-1){
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.