assertEquals("image/tiff", response.getContentType());
tiffContents = getBinary(response);
File fileOverviewSF = File.createTempFile("overviewSF", "overviewSF.tiff", new File("./target"));
FileUtils.writeByteArrayToFile(fileOverviewSF, tiffContents);
TIFFImageReaderSpi spi = new TIFFImageReaderSpi();
TIFFImageReader readerNative = null;
TIFFImageReader readerOverviewTS = null;
TIFFImageReader readerOverviewSF = null;
FileImageInputStream streamNative = null;
FileImageInputStream streamOverviewTS = null;
FileImageInputStream streamOverviewSF = null;
try {
streamNative = new FileImageInputStream(fileNative);
readerNative = (TIFFImageReader) spi.createReaderInstance();
readerNative.setInput(streamNative);
streamOverviewTS = new FileImageInputStream(fileOverviewTS);
readerOverviewTS = (TIFFImageReader) spi.createReaderInstance();
readerOverviewTS.setInput(streamOverviewTS);
streamOverviewSF = new FileImageInputStream(fileOverviewSF);
readerOverviewSF = (TIFFImageReader) spi.createReaderInstance();
readerOverviewSF.setInput(streamOverviewSF);
// Reading back first image related to native request
RenderedImage riNative = readerNative.read(0);
Raster rasterNative = riNative.getData();