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


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

Re: jdbc setBinaryStream

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Martin Gregorie <martin@address-in-sig.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: jdbc setBinaryStream
Date Sun, 30 Nov 2014 00:07:36 +0000 (UTC)
Organization A noiseless patient Spider
Lines 32
Message-ID <m5dn48$1ci$1@dont-email.me> (permalink)
References <slrnm7jn16.uoi.avl@login.logic.tuwien.ac.at> <m5d8ii$cch$1@dont-email.me> <slrnm7kbj7.uoi.avl@login.logic.tuwien.ac.at>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Injection-Date Sun, 30 Nov 2014 00:07:36 +0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="e5160e2be48f1ea550cf61512446f525"; logging-data="1426"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19CwwR5an+5OMpVi+zCiO26f0jbE5LpTvU="
User-Agent Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2)
Cancel-Lock sha1:MEqEgL3CpE3RqrCxycN9/gw+O14=
Xref csiph.com comp.lang.java.programmer:30452

Show key headers only | View raw


On Sat, 29 Nov 2014 20:36:40 +0000, Andreas Leitgeb wrote:

> In hindsight (now that I've solved my own "puzzle"), the
> ByteArray*Stream helped you in two ways: first, to do the rather
> unexpectedly necessary text<->bytes conversion,
>
I could be wrong, but I don't think any conversion is needed or done: 
AFAIK a text field is simply an array of bytes that's as big as needed to 
contain an arbitrary amount of data and the streams just transfer raw 
bytes. 

I throw complete MIME encoded message bodies into a text fields when 
archiving a message and, when I need to look at an archived message, its 
sucked out, attached to a newly built covering message as a whole e-mail 
message and sent to my normal mail account so I can open it with my usual 
mail reader. I never had problems accessing all the MIME parts in the 
archived message. None of them have ever shown signs of being garbled by 
character code translations. Binary types, e.g. JPG images, open as 
normal.
 
> ByteArrayInputStream has conveniently implemented available() as needed
> at least by informix jdbc-drivers. (as I just learnt...)
>
I've never looked at that because I haven't needed to use it. All I care 
about, which I did check during initial testing, is that the same number 
of bytes are present before and after either transfer direction.
  

-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

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


Thread

jdbc setBinaryStream Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-11-29 14:45 +0000
  Re: jdbc setBinaryStream Daniele Futtorovic <da.futt.news@laposte.net> - 2014-11-29 16:57 +0100
    Re: jdbc setBinaryStream Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-11-29 16:58 +0000
      Re: jdbc setBinaryStream Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-11-29 19:39 +0000
        Re: jdbc setBinaryStream Daniele Futtorovic <da.futt.news@laposte.net> - 2014-11-30 02:37 +0100
          Re: jdbc setBinaryStream Arne Vajhøj <arne@vajhoej.dk> - 2014-11-29 21:26 -0500
            Re: jdbc setBinaryStream Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-11-30 11:12 +0000
  Re: jdbc setBinaryStream Martin Gregorie <martin@address-in-sig.invalid> - 2014-11-29 19:59 +0000
    Re: jdbc setBinaryStream Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-11-29 20:36 +0000
      Re: jdbc setBinaryStream Martin Gregorie <martin@address-in-sig.invalid> - 2014-11-30 00:07 +0000
        Re: jdbc setBinaryStream Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-11-30 14:56 +0000
          Re: jdbc setBinaryStream Martin Gregorie <martin@address-in-sig.invalid> - 2014-12-01 14:06 +0000
            Re: jdbc setBinaryStream Arne Vajhøj <arne@vajhoej.dk> - 2014-12-01 21:36 -0500
              Re: jdbc setBinaryStream Martin Gregorie <martin@address-in-sig.invalid> - 2014-12-02 12:16 +0000
            Re: jdbc setBinaryStream Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-12-02 17:56 +0000
              Re: jdbc setBinaryStream Martin Gregorie <martin@address-in-sig.invalid> - 2014-12-02 21:37 +0000

csiph-web