Re: Convert byte stream to user defined type/class

Tech-Archive recommends: Fix windows errors by optimizing your registry



Macca wrote:
> My application receives data from multiple sources transferred over
> ethernet. This data is broken into packets of bytes before being transmitted
> over the network.
>
> My application has to take the data and arrange into a user defined
> type/class.
>
> e.g one message from source 1 may be 10-15KB. This is broken down into
> smaller packets say for arguments sake 1KB.
>
> My application then has to take each packet and construct the data back into
> it's orginal size of 15KB.
>
> This will probably be stored in some sort of array/arraylist of doubles
> rather than bytes.
>
> My question is :- what is the best/most efficient way of converting the
> individual packets of bytes into an array of say doubles?

It's not clear whether you're only controlling the reading side or not.
Do you get to decide how to write the data *and* how to read it, or is
the data you're reading already in a fixed format?

Jon

.



Relevant Pages

  • Re: java thread for core 2 due processors
    ... Your threads are mostly sitting waiting for socket i/o to ... simpler if the reading and processing is all encapsulated in the same task. ... NIO also isn't as efficient, ... in 64KiB packets into a BlockingQueue.. ...
    (comp.lang.java.programmer)
  • Re: Setting disk ratios and monitoring bandwith usage.
    ... > that would log every packets for a specific IP (each account should ... > have a diff IP) and there should be a program, reading the firewall ...
    (comp.os.linux.networking)
  • Re: Start VPN on demand
    ... > way of being able to bring up the link on demand? ... > May I suggest you DIALD: ... I've been reading and trying, reading and trying, and still reading and ... I want to run "vpnc-connect" when packets are seen from ...
    (comp.os.linux.networking)
  • Re: Newbie snort
    ... > If I save packets from snort or other util like tcpdump, ... > and pass in that packet file and get snort to run as if it were actual ... If you haven't gotten to it in the manual yet: Yes, keep reading. ...
    (comp.os.linux.security)
  • Re: Problem with CS8900A 5v in 8-bit
    ... >CS8900A reads/writes registers, transmits and receives packets ... >and then suddenly stops responding. ... If I try reading any registers ... The bug prevented the packets to go out when certain ...
    (comp.arch.embedded)