Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!74.125.46.80.MISMATCH!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: Buffers not Serializable in Java? Date: Sun, 23 Oct 2011 16:01:55 -0700 (PDT) Organization: http://groups.google.com Lines: 23 Message-ID: <4227919.669.1319410915805.JavaMail.geo-discussion-forums@yqgd7> References: Reply-To: comp.lang.java.programmer@googlegroups.com NNTP-Posting-Host: 72.14.225.65 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1319410916 8940 127.0.0.1 (23 Oct 2011 23:01:56 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 23 Oct 2011 23:01:56 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=72.14.225.65; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9124 bob wrote: > Why are Buffers not Serializable in Java? (One presumes to assume that you refer here to 'java.nio.Buffer'.) Why should they be? What would a serialized 'Buffer' mean, exactly? A 'Buffer' is a holder for serialized data already, is it not? It's sort of like serializing a Reader or a Writer. It boils down to what one considers state for the type. Anyway, 'Buffer' is intended as a staging area between things, a conduit for serialization. You would simply transmit the contents of the 'Buffer'. Now one gives you the benefit of the doubt that you really want to serialize one of the subtypes of 'Buffer', since you can't instantiate an abstract class. Near as I can tell, you can quite readily serialize the 'array()' results given back by these subtypes are all serializable, so you're only one method call away. Now, please answer in return, why in the world do you want to serialize a 'Buffer'? -- Lew