Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #19372

Re: RAM FileDescriptor

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: RAM FileDescriptor
Date Mon, 15 Oct 2012 14:34:00 -0400
Organization A noiseless patient Spider
Lines 23
Message-ID <k5hkus$hs6$1@dont-email.me> (permalink)
References <f6d1d840-9769-447a-893e-f8cce07d2d23@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Mon, 15 Oct 2012 18:34:04 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="ffb8f7085759b339c1002252b48331a4"; logging-data="18310"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+aUiDlAWe9HbGRb53+5As0"
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121010 Thunderbird/16.0.1
In-Reply-To <f6d1d840-9769-447a-893e-f8cce07d2d23@googlegroups.com>
Cancel-Lock sha1:myxhfLB3hyYm/WNkc2s2/QYeqWU=
Xref csiph.com comp.lang.java.programmer:19372

Show key headers only | View raw


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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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