Re: Fastest way of combining byte arrays of different lengths?
Date: Tue, 23 Mar 2004 09:17:25 -0800
Princess Morgiah wrote:
> I'm trying to download chunks off of a Socket, and return them as a single
> byte array. At the moment I store all the chunks in a Vector, calculate the
> total length, reserve that amount of bytes in a new buffer and fill the
> It works, but it's only a temporary solution - not clean, and especially not
> fast (+100ms for a few 100k bytes).
Well... first of all for speed, be sure to wrap your input stream in a
Then look at ByteArrayOutputStream.
But just setting the size on the BufferedInputStream and tuning your
sleep a little might give you the best performance.
- Re: Hex Data to Serial Port
... Thank you for your replies, In specific I have to send typically 6-8 ... bytes of data which I am trying to store in a buffer as array. ...
- Fastest way of combining byte arrays of different lengths?
... single new byte array? ... I'm trying to download chunks off of a Socket, and return them as a single ... reserve that amount of bytes in a new buffer and fill the ... Can somebody recommend me a faster way of doing this? ...
- Re: software design question
... buffer for it though. ... Or store the strings in an array because ... I was only talking about storing the strings *to print later* in an array, ...
- how to deconcatenate
... what should i do to store some array in a buffer and then delete them randomly ... and now i want to delete data2 from buffer ... ...
- PKWARE DCL-compatible compressor and decompressor (based on Ben Rudiak-Goulds information)
... /* being able to compress as well as PKWARE Data Compression library, ... // Size of output buffer, ... // Store the current size of output ...