fix: wrap OutputStream in WritableByteChannel for transferTo
Build & Deploy / build-and-deploy (push) Successful in 36s

This commit is contained in:
Hermes Agent
2026-06-03 15:51:08 +02:00
parent db1879e22d
commit 7f534689fb
@@ -167,7 +167,7 @@ public class StaticResource {
public void write(OutputStream output) throws IOException { public void write(OutputStream output) throws IOException {
try (FileChannel ch = FileChannel.open(file, StandardOpenOption.READ)) { try (FileChannel ch = FileChannel.open(file, StandardOpenOption.READ)) {
if (length > 0) { if (length > 0) {
ch.transferTo(offset, length, output); ch.transferTo(offset, length, java.nio.channels.Channels.newChannel(output));
} }
} }
} }