fix(api): stop using dropped streamEntryFromArchive (#315)
the `streamEntryFromArchive` helper was replaced with `ArchiveService.transferEntryTo` and during the merge of #113 we had a conflict that was automatically resolved incorrectly this replaces the erroneous call with the expected to fix the build
This commit is contained in:
@@ -112,7 +112,7 @@ public class CbxReaderService {
|
||||
List<CbxPageDimension> dimensions = new ArrayList<>();
|
||||
for (int i = 0; i < imageEntries.size(); i++) {
|
||||
String entryName = imageEntries.get(i);
|
||||
CbxPageDimension dim = readEntryDimension(cbxPath, entryName, metadata, i + 1);
|
||||
CbxPageDimension dim = readEntryDimension(cbxPath, entryName, i + 1);
|
||||
dimensions.add(dim);
|
||||
}
|
||||
return dimensions;
|
||||
@@ -122,10 +122,10 @@ public class CbxReaderService {
|
||||
}
|
||||
}
|
||||
|
||||
private CbxPageDimension readEntryDimension(Path cbxPath, String entryName, CachedArchiveMetadata metadata, int pageNumber) {
|
||||
private CbxPageDimension readEntryDimension(Path cbxPath, String entryName, int pageNumber) {
|
||||
try {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
streamEntryFromArchive(cbxPath, entryName, baos, metadata);
|
||||
archiveService.transferEntryTo(cbxPath, entryName, baos);
|
||||
byte[] imageBytes = baos.toByteArray();
|
||||
try (ImageInputStream iis = ImageIO.createImageInputStream(new ByteArrayInputStream(imageBytes))) {
|
||||
Iterator<ImageReader> readers = ImageIO.getImageReaders(iis);
|
||||
|
||||
Reference in New Issue
Block a user