diff --git a/src/main/java/com/dostalgia/StaticResource.java b/src/main/java/com/dostalgia/StaticResource.java index 2a9bbf2..fdbc6de 100644 --- a/src/main/java/com/dostalgia/StaticResource.java +++ b/src/main/java/com/dostalgia/StaticResource.java @@ -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)); } } }