Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: David Lamb Newsgroups: comp.lang.java.programmer Subject: Re: RAM FileDescriptor Date: Mon, 15 Oct 2012 15:07:58 -0400 Organization: A noiseless patient Spider Lines: 20 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 15 Oct 2012 19:07:58 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="7f42270a997e580902d19031af10867c"; logging-data="32078"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19UjApaqj8kdaxZfANv53R6" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 In-Reply-To: Cancel-Lock: sha1:06c053ZLWZjctAl702/ywF1MKhs= Xref: csiph.com comp.lang.java.programmer:19374 On 15/10/2012 2:41 PM, Jeff Higgins wrote: > On 10/15/2012 02:08 PM, bob smith wrote: >> Let's say you have a function that plays a movie that is passed in as >> a FileDescriptor. Is there any way to load the movie into RAM and get >> a FileDescriptor for the RAM? > Looking here: > > the most likely route seems to be java.io.RandomAccessFile.getFD(). But > I don't know what "a FileDescriptor for the RAM" means. Will you clarify? I doubt it exists as a general concept and thus probably doesn't exist in Java. I seem to recall that some operating systems from many years ago let you map a file into RAM and operate on it from there, but I'm moderately sure that feature either went through the standard file system stuff and was (nearly) invisible, or you accessed a massive byte array directly. The former corresponds to people's advice to use a FileInputStream amd the latter to a ByteInputStream as appropriate. Wouldn't your movie exceed the capacity of RAM? or are you limiting yourself to short ones?