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;