Describe the bug
Reading an archive with an empty file is throwing an IllegalArgumentException.
To Reproduce
try (final var archive = new Archive(Path.of("file.rar").toFile())) {
while (true) {
final var fileHeader = archive.nextFileHeader();
if (null == fileHeader) {
break;
}
final var outputStream = new ByteArrayOutputStream();
//archive.extractFile(fileHeader, outputStream); // OK
archive.getInputStream(fileHeader).transferTo(outputStream); // IllegalArgumentException: Pipe Size <= 0
System.out.println(outputStream);
}
}
Expected behavior
Should return an empty InputStream instead of throwing an IllegalArgumentException.
File
file.rar.zip
(need to extract the ZIP file to get the RAR inside)
Environment (please complete the following information):
- OS: Windows
- Junrar version: 7.5.1 (latest)
Additional context
None
Describe the bug
Reading an archive with an empty file is throwing an IllegalArgumentException.
To Reproduce
Expected behavior
Should return an empty InputStream instead of throwing an IllegalArgumentException.
File
file.rar.zip
(need to extract the ZIP file to get the RAR inside)
Environment (please complete the following information):
Additional context
None