Module resource as seekable byte channel?

Mark Raynsford org.openjdk at io7m.com
Sun Feb 4 13:31:45 UTC 2018


Hello.

I'm working on a problem that would seem to require accessing a
(large) resource included inside a module in random manner. More
specifically, I have some large audio resources inside a module and
need to be able to get something analogous to a SeekableByteChannel
for a given resource so that I can stream the audio and seek
forwards/backwards.

I could unpack the resources to the filesystem, but I'd prefer not to
do this (because that would then mean I'm using double the amount of
storage).

Is there some way to get access to a module resource as a
SeekableByteChannel in the standard library?

--
Mark Raynsford | http://www.io7m.com



More information about the jigsaw-dev mailing list