pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Brad Milne <mail_4brad@yahoo.co.uk>
To: pgsql-jdbc@postgresql.org
Cc: Thomas Kellerer <spam_eater@gmx.net>
Subject: Re: BLOB help - yes I've read around!
Date: Wed, 08 Apr 2009 09:55:14 +1200
Message-ID: <49DBCBC2.6080402@yahoo.co.uk> (raw)
In-Reply-To: <grgham$q84$1@ger.gmane.org>
References: <49DB559F.3030805@yahoo.co.uk>
	<200904071657.08065.achill@matrix.gatewaynet.com>
	<49DB5D63.5040103@yahoo.co.uk>
	<grfoia$t7m$1@ger.gmane.org>
	<49DBC6DC.5030609@yahoo.co.uk>
	<grgham$q84$1@ger.gmane.org>

Thomas Kellerer wrote:
> Brad Milne wrote on 07.04.2009 23:34:
>> For completeness, here is the setter again with a couple of fixes:
>>
>> stmt.setBinaryStream(2,in,in.available());
>
> Do not use availabe()
>
> This will *not* give you the number of bytes that are "available" in 
> the stream.
>
> Read the Javadocs carefully: it will give you the number of bytes that 
> can be /read without blocking/
>
> Most of the time this will not be the length of the stream.
>
Good point Thomas, I hear you. I shouldn't have written that hear as 
others could follow that. In my implementation it is ok as the stream is 
complete prior to persisting it. I have an AudioInputStream object, but 
it is always complete. If you think I should be therefore using a 
different method/db object then I'd be pleased to hear.

Thanks
Brad



view thread (10+ messages)  latest in thread

Message-ID: <49DBCBC2.6080402@yahoo.co.uk>
Permalink:  ../49DBCBC2.6080402@yahoo.co.uk/
Also on:    postgresql.org/message-id/49DBCBC2.6080402@yahoo.co.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: mail_4brad@yahoo.co.uk, spam_eater@gmx.net
  Subject: Re: BLOB help - yes I've read around!
  In-Reply-To: <49DBCBC2.6080402@yahoo.co.uk>
  References: <49DB559F.3030805@yahoo.co.uk> <200904071657.08065.achill@matrix.gatewaynet.com> <49DB5D63.5040103@yahoo.co.uk> <grfoia$t7m$1@ger.gmane.org> <49DBC6DC.5030609@yahoo.co.uk> <grgham$q84$1@ger.gmane.org> <49DBCBC2.6080402@yahoo.co.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox