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


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

Re: StringBuilder for byte[]

X-Received by 10.66.84.100 with SMTP id x4mr1714458pay.43.1358557636950; Fri, 18 Jan 2013 17:07:16 -0800 (PST)
X-Received by 10.50.150.142 with SMTP id ui14mr1352889igb.9.1358557636900; Fri, 18 Jan 2013 17:07:16 -0800 (PST)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!newsfeed.news.ucla.edu!usenet.stanford.edu!ld4no9924289pbb.0!news-out.google.com!s9ni24pbb.0!nntp.google.com!ld4no9924284pbb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.programmer
Date Fri, 18 Jan 2013 17:07:16 -0800 (PST)
In-Reply-To <50f9de01$0$282$14726298@news.sunsite.dk>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=69.28.149.29; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T
NNTP-Posting-Host 69.28.149.29
References <ti2if89pi9o6fcd32b739prbocff6i9plp@4ax.com> <alsp4iF91cjU1@mid.dfncis.de> <7ff63461-89b5-4196-8902-ead245eb6945@googlegroups.com> <50f9de01$0$282$14726298@news.sunsite.dk>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <f9276cb7-52df-4fcf-86a7-442d0a9a21d2@googlegroups.com> (permalink)
Subject Re: StringBuilder for byte[]
From Lew <lewbloch@gmail.com>
Injection-Date Sat, 19 Jan 2013 01:07:16 +0000
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Xref csiph.com comp.lang.java.programmer:21561

Show key headers only | View raw


Arne Vajhøj wrote:
> Lew wrote:
>>> Roedy Green:
>>>> It would be a fairly simple task to write a StringBuilder or FastCat
>>>> that worked with byte[].  I wonder if such a beast exists already, or
>>>> if there would be much use for it.

>> A better choice would be
>> http://docs.oracle.com/javase/7/docs/api/java/io/CharArrayWriter.html
> 
> But wasn't the point to work with byte[] instead of String/char[] ?

Was it? 

He said that the task is "to write a StringBuilder or FastCat". I don't know what a 
"FastCat" is, but a 'StringBuilder' needs encodings. So 'byte[]' is a case of being 
focused on implementation rather than goal, a flaw you yourself often notice in 
people's queries, Arne.

So I have to ask, if your goal is to build a 'String', why would you use 'byte' when 'char' 
is for that purpose?

I presume to conclude that Roedy screwed up on that one.

-- 
Lew

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


Thread

StringBuilder for byte[] Roedy Green <see_website@mindprod.com.invalid> - 2013-01-18 00:40 -0800
  Re: StringBuilder for byte[] Sven Köhler <remove-sven.koehler@gmail.com> - 2013-01-18 12:15 +0100
    Re: StringBuilder for byte[] Lew <lewbloch@gmail.com> - 2013-01-18 08:54 -0800
      Re: StringBuilder for byte[] Sven Köhler <remove-sven.koehler@gmail.com> - 2013-01-18 18:08 +0100
      Re: StringBuilder for byte[] Arne Vajhøj <arne@vajhoej.dk> - 2013-01-18 18:42 -0500
        Re: StringBuilder for byte[] Lew <lewbloch@gmail.com> - 2013-01-18 17:07 -0800
          Re: StringBuilder for byte[] Arne Vajhøj <arne@vajhoej.dk> - 2013-01-18 20:27 -0500
            Re: StringBuilder for byte[] Arne Vajhøj <arne@vajhoej.dk> - 2013-01-18 20:28 -0500
          Re: StringBuilder for byte[] Roedy Green <see_website@mindprod.com.invalid> - 2013-01-18 23:21 -0800
            Re: StringBuilder for byte[] Lew <lewbloch@gmail.com> - 2013-01-19 00:42 -0800
              Re: StringBuilder for byte[] Roedy Green <see_website@mindprod.com.invalid> - 2013-01-20 00:48 -0800
  Re: StringBuilder for byte[] Arne Vajhøj <arne@vajhoej.dk> - 2013-01-18 18:44 -0500

csiph-web