Solved
Testing Extract Servlet Meta data
SlingHttpServletResponse.getOutStream is coming as null while running the test case
SlingHttpServletResponse.getOutStream is coming as null while running the test case
Hi,
getOutputStream is used for writing the binary content. If I understand your usecase correctly you are trying to read from the servlet response. In this case you can do something like -
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(response.getOutput());
BufferedImage image = ImageIO.read(byteArrayInputStream);
and then you can read metadata from the image object.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.