Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #19372
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: RAM FileDescriptor |
| Date | 2012-10-15 14:34 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <k5hkus$hs6$1@dont-email.me> (permalink) |
| References | <f6d1d840-9769-447a-893e-f8cce07d2d23@googlegroups.com> |
On 10/15/2012 2:08 PM, bob smith wrote:
> Let's say you have a function that plays a movie that
> is passed in as a FileDescriptor.
Okay: "You have a function that ..."
Why would you want to write such a method? As I understand
the Javadoc, the method could only get at the bytes behind the
FileDescriptor by constructing a FileInputStream from it, then
reading the FileInputStream. Why not have the method take a
FileInputStream in the first place? Better yet, why not have
it take an InputStream, and not insist on the "file" part?
> Is there any way to load the movie into RAM and get a
> FileDescriptor for the RAM?
Probably not. A method that took an InputStream could,
of course, be given a ByteArrayInputStream -- but if you're
dead-set on using FileDescriptor, I think you're out of luck.
--
Eric Sosman
esosman@comcast-dot-net.invalid
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
RAM FileDescriptor bob smith <bob@coolfone.comze.com> - 2012-10-15 11:08 -0700
Re: RAM FileDescriptor Lew <lewbloch@gmail.com> - 2012-10-15 11:27 -0700
Re: RAM FileDescriptor Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-10-15 14:34 -0400
Re: RAM FileDescriptor Jeff Higgins <jeff@invalid.invalid> - 2012-10-15 14:41 -0400
Re: RAM FileDescriptor David Lamb <dalamb@cs.queensu.ca> - 2012-10-15 15:07 -0400
Re: RAM FileDescriptor Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-10-15 12:59 -0700
Re: RAM FileDescriptor Arne Vajhoej <arne@vajhoej.dk> - 2012-10-17 11:45 -0400
Re: RAM FileDescriptor David Lamb <dalamb@cs.queensu.ca> - 2012-10-17 15:08 -0400
Re: RAM FileDescriptor Jeff Higgins <jeff@invalid.invalid> - 2012-10-15 15:25 -0400
Re: RAM FileDescriptor Jeff Higgins <jeff@invalid.invalid> - 2012-10-15 16:22 -0400
Re: RAM FileDescriptor Jeff Higgins <jeff@invalid.invalid> - 2012-10-15 16:26 -0400
Re: RAM FileDescriptor Jim Janney <jjanney@shell.xmission.com> - 2012-10-16 12:40 -0600
Re: RAM FileDescriptor Arne Vajhoej <arne@vajhoej.dk> - 2012-10-17 11:43 -0400
Re: RAM FileDescriptor Jan Burse <janburse@fastmail.fm> - 2012-10-17 17:55 +0200
csiph-web