Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!usenet.ukfsn.org!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: Fav. Memory Stream Impl. Date: Tue, 29 Nov 2011 21:05:51 +0000 (UTC) Organization: UK Free Software Network Lines: 26 Message-ID: References: <4ed0101b$0$282$14726298@news.sunsite.dk> <9jflnkFnrgU1@mid.individual.net> <9jgqmvFjc4U1@mid.individual.net> <6b19df45-6141-45f0-ae2e-8ff30ece4928@y42g2000yqh.googlegroups.com> <9ji3juFomgU1@mid.individual.net> <4ed4bfc0$0$8819$426a74cc@news.free.fr> NNTP-Posting-Host: 84.45.235.129 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: localhost.localdomain 1322600751 14581 84.45.235.129 (29 Nov 2011 21:05:51 GMT) X-Complaints-To: usenet@localhost.localdomain NNTP-Posting-Date: Tue, 29 Nov 2011 21:05:51 +0000 (UTC) User-Agent: Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 30dc37b master) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10336 On Tue, 29 Nov 2011 21:34:54 +0100, Jan Burse wrote: > Martin Gregorie schrieb: >> As you say the individual file sizes are a few tens of bytes, have you >> looked at using ByteInputStream and ByteOutputStream? >> >> If you have considered them, why are they unsuitable? > > They could play a part in the game. But two problems are unsolved: > sharing and positioning. > My bad: I meant ByteArrayInputStream and ByteArrayOutputStream The names are a little confusing: ByteArrayInputStream reads *from* a byte array. The ByteArrayOutputStream writes *into* a byte array. I've used them to move byte arrays to and from CLOB columns in databases, where they were straight-forward to use with CLOB sizes ranging from a few bytes to a few megabytes, though I never had more than one or two instances in use at a time. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |