This can not be done with vlcj as the required functionality simply does not exist in LibVLC.
What you want is usually achieved by using the VLC imem plugin, but this plugin is not exposed by LibVLC.
There have been attempts to patch VLC to expose imem (at least the "access" aspect of it), but they were not so far acceptable.
Even if it were possible there would be limitations. If you want to play from an InputStream
, you can't seek (at least not usefully) - in fact you can't properly seek a Java InputStream generally anyway. That leaves using something like RandomAccessFile
if you want to seek, but if you are going to use RandomAccessFile
that implies you have access to a local file anyway, so you would just play the file normally. But that's all moot.