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


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

Re: Buffers not Serializable in Java?

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 <lewbloch@gmail.com>
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> (permalink)
References <a12ae79e-0c35-41b4-ae36-6f9a84cc588b@q13g2000vbd.googlegroups.com>
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 <a12ae79e-0c35-41b4-ae36-6f9a84cc588b@q13g2000vbd.googlegroups.com>
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

Show key headers only | View raw


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

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Buffers not Serializable in Java? bob <bob@coolgroups.com> - 2011-10-23 11:11 -0700
  Re: Buffers not Serializable in Java? Lew <lewbloch@gmail.com> - 2011-10-23 16:01 -0700
  Re: Buffers not Serializable in Java? dagon@dagon.net (Dagon) - 2011-10-23 13:16 -0700
  Re: Buffers not Serializable in Java? Roedy Green <see_website@mindprod.com.invalid> - 2011-10-23 21:02 -0700

csiph-web