This should do it:
final FileChannel channel = FileChannel.open(file, StandardOpenOption.READ);
final Sender sender = exchange.getResponseSender();
sender.transferFrom(channel, new IoCallback() {
....
});
Note that this will not close the channel automatically, it must be
done in the callback.
Stuart
On Mon, Oct 17, 2016 at 3:54 AM, Hicks, Matt <matt(a)matthicks.com> wrote:
The ResourceManager is great for serving directories, but if I have a
very
specific file I want to serve up is there any built-in functionality to
conveniently do so? I've looked through the documentation and the examples
and can't seem to find any references to doing this. Help would be greatly
appreciated.
Thanks
_______________________________________________
undertow-dev mailing list
undertow-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev