Denis,
I am afraid I do not understand how I can convert the two elements:
> IgniteFileSystem fs = ignite.fileSystem("myigfs");
>
> // Image path.
> IgfsPath workDir = new IgfsPath("/data/content.gif");
into a URL that the client can consume.
The only thought I have is that I could open IgfsInputStream and stream it
into HttpConnection OutputStream after setting the appropriate content-type
like so:
> // Open input stream to the image in IGFS ...
> IgniteFileSystem fs = ignite.fileSystem("myigfs");
> IgfsPath myImage = new IgfsPath("/data/content.gif");
> IgfsInputStream inps = fs.open(myImage);
>
> byte[] buf = new byte[4096];
> int len = -1;
>
> // Read from IGFS input stream and stuff into servlet response output
> stream
> while ((len = inStream.read(buf)) != -1) {
> outStream.write(buf, 0, len);
> }
>
> outStream.flush();
> outStream.close();
Is there a better way?
thanks again for your assistance.
/Kobe
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/How-is-igfs-URL-resolved-tp2142p2545.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.