Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Jan Burse Newsgroups: comp.lang.java.programmer Subject: Re: Fav. Memory Stream Impl. Date: Fri, 25 Nov 2011 22:36:06 +0100 Organization: albasani.net Lines: 18 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net 3ElwRaxvFEW+nFvBCXqiV4YtiQVA12BpGnqcU8wHNbQ5r+hBlmvySFDfimVoSxZUO8JBqYYYtsI2Yvyke0+rHWuUyyGwbMzIVHzPW3zUfZZBmzztUAidgTXDbAmt8tRo NNTP-Posting-Date: Fri, 25 Nov 2011 21:36:11 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="DSMXJaKVNkE0pwf5e/If5a3gPoWA//7vJHMUn6Gnro7O4w6tZ59E8kAdilKlgaqpyLWoQXAkl0vszgagUPwnK7fztJTVEd3hdeXcGRT/2u8NdS1F6TpjSbTIrOVvlkXM"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110928 Firefox/7.0.1 SeaMonkey/2.4.1 In-Reply-To: Cancel-Lock: sha1:dqHl64zX5KmfE2OK1PjA8XfiOYk= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10239 Jan Burse schrieb: > The memory stream should be sharable. Well to some extend ByteArrayOutputStream and ByteArrayInputStream are shareble. They are at least thread safe, I find: public synchronized void write(int b) { So the same output object can be used by multiple threads. And the same input object can be used by multiple threads. But I would like to be able to do the same as with a temporary file. Some threads open it for read, and some threads open it for write. Bye