"Ron Albright" <> wrote in message
news:...
> You use a ByteArrayOutputStream but only way you can access the result
> is by getting a copy of the byte array each time you write. Is there a
> better way to do this that doesn't require creating a new byte array
> for each write?
In what way are you using the ByteArrayOutputStream. You don't need to
create an array each time you write. Surely that is the objective of using
this class.
>I looked at the nio package and didn't see any support
> for writing objects to a file.
And how does the above relate to writing to a file. If you want to write
your bytes to a file then have a look at the java.io package. You need to
include something like a DataOutputStream and a FileWriter.
Cheers
Andrew
--
************************************************** ******
Andrew Hobbs PhD
MetaSense Pty Ltd -
www.metasense.com.au
12 Ashover Grove
Carine W.A.
Australia 6020
61 8 9246 2026
metasens AntiSpam @iinet dot net dot au
************************************************** *******
> --
> My email isn't airmail.
> Ron