fix: wrap OutputStream in WritableByteChannel for transferTo
Build & Deploy / build-and-deploy (push) Successful in 36s
Build & Deploy / build-and-deploy (push) Successful in 36s
This commit is contained in:
@@ -167,7 +167,7 @@ public class StaticResource {
|
||||
public void write(OutputStream output) throws IOException {
|
||||
try (FileChannel ch = FileChannel.open(file, StandardOpenOption.READ)) {
|
||||
if (length > 0) {
|
||||
ch.transferTo(offset, length, output);
|
||||
ch.transferTo(offset, length, java.nio.channels.Channels.newChannel(output));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user