Package org.dspace.content

Examples of org.dspace.content.Bitstream.retrieve()


                return;
            }
        }
       
        // Pipe the bits
        InputStream is = bitstream.retrieve();
    
    // Set the response MIME type
        response.setContentType(bitstream.getFormat().getMIMEType());

        // Response length
View Full Code Here


                {
                    Bitstream licBit = licBits[0];
                    InputStream in;
                    try
                    {
                        in = licBit.retrieve();
                        ByteArrayOutputStream out = new ByteArrayOutputStream();
                        Utils.bufferedCopy(in, out);
                        license.getField().add(
                                createValue("bin",
                                        Base64Utils.encode(out.toString())));
View Full Code Here

            //UsageEvent ue = new UsageEvent();
           // ue.fire(request, context, AbstractUsageEvent.VIEW,
       //Constants.BITSTREAM, bitstream.getID());

            // Pipe the bits
            InputStream is = bitstream.retrieve();

            // Set the response MIME type
            response.setContentType(bitstream.getFormat().getMIMEType());

            // Response length
View Full Code Here

            // Response length
            response.setHeader("Content-Length", String.valueOf(bitstream
                    .getSize()));

            // Pipe the bits
            InputStream is = bitstream.retrieve();

            Utils.bufferedCopy(is, response.getOutputStream());
            is.close();
            response.getOutputStream().flush();
        }
View Full Code Here

                        primary = "\tprimary:true ";
                    }

                    int myPrefix = 1; // only used with name conflict

                    InputStream is = b.retrieve();

                    boolean isDone = false; // done when bitstream is finally
                    // written

                    while (!isDone)
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.