Package com.alibaba.simpleimage.io

Examples of com.alibaba.simpleimage.io.ByteArrayOutputStream.toInputStream()


        ByteArrayOutputStream temp = new ByteArrayOutputStream();
        IOUtils.copy(inputStream, temp);
        IOUtils.closeQuietly(inputStream);

        InputStream img = temp.toInputStream();
        temp = null;

        System.out.println("***********Performance Test**************");

        for (int i = 0; i < frequency; i++) {
View Full Code Here


    public static InputStream createMemoryStream(InputStream input) throws IOException {
        if ((!(input instanceof ByteArrayInputStream)) && (!(input instanceof java.io.ByteArrayInputStream))) {
            ByteArrayOutputStream temp = new ByteArrayOutputStream();
            IOUtils.copy(input, temp);

            input = temp.toInputStream();
            temp = null;
        }

        return input;
    }
View Full Code Here

        ByteArrayOutputStream temp = new ByteArrayOutputStream();
        IOUtils.copy(inputStream, temp);
        IOUtils.closeQuietly(inputStream);

        InputStream img = temp.toInputStream();
        temp = null;

        System.out.println("***********Scale Performance Test**************");
        long start = 0L, end = 0L, total = 0L;

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.