You must have google bout conversion of byteArray to Object in dot.net
See, first understand, why we used byte array? Simple is to save time over
the n/w, So its our job to get the object in the required at .net and flex
end. Thats BlazeDS and WEBORB came into existence which provide the data at
the front end and backend in the requried format.

Anyways,

at .net end, use the following code and debug the Obj

 [  via <http://snippets.dzone.com/posts/show/3897>   ]

// Convert an object to a byte arrayprivate byte[]
ObjectToByteArray(Object obj){
    if(obj == null)
        return null;
    BinaryFormatter bf = new BinaryFormatter();
    MemoryStream ms = new MemoryStream();
    bf.Serialize(ms, obj);
    return ms.ToArray();}// Convert a byte array to an Objectprivate
Object ByteArrayToObject(byte[] arrBytes){
    MemoryStream memStream = new MemoryStream();
    BinaryFormatter binForm = new BinaryFormatter();
    memStream.Write(arrBytes, 0, arrBytes.Length);
    memStream.Seek(0, SeekOrigin.Begin);
    Object obj = (Object) binForm.Deserialize(memStream);
    return obj;}




Hope this helps

On 27 June 2011 10:27, nvxuser <[email protected]> wrote:

> I wrote my array collection to byte array.. and send to the server
> side. It takes less time to reach.. One doubt here.. how can i convert
> it back (to array collection)
>
> My value object contains 32 fields and list contains more than 3000 in
> hierarchical data. i wrote this to bytearray using the following code
>
> var byteArray:ByteArray = new ByteArray();
> byteArray.writeObject(taskCollection);
>
> And send it over the page.. At the served side wrote
> byte[] TaskByteArray;
>
> it gets a byte array of size {55555555}
>  how can i convert it back (to array collection)
> Jst give me a hint..
>
> On Jun 24, 10:22 am, HISSAM <[email protected]> wrote:
> > Why dont you convert to byte array and then send across the network and
> at
> > the server side convert it to the required type
> >
> > On 23 June 2011 15:17, nvxuser <[email protected]> wrote:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > > Dear All,
> >
> > >             In my application i am sending an array collection
> > > to .Net through FluorineFx . My data is in the form of Hierarchical
> > > model. Array collection length is one. That object contains more than
> > > 100 records as child, each child has its own children then so on..
> > > When total records length (including all children) is less than 500 it
> > > takes less time to send data to .Net method. When the record count is
> > > high higher the time. When record count exceeds 3000 it takes more
> > > than 4 minutes to reach .net method.
> >
> > >      Any help will be appreciated. Thanks in advance
> >
> > > Regards,
> > > NVXUSR
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Flex India Community" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected].
> > > For more options, visit this group at
> > >http://groups.google.com/group/flex_india?hl=en.
> >
> > --
> >
> > Hissam,
> > Flex Developer,
> > INDIA.
> > (m) +919860694301
> > If I CRY angels deserves to DIE.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>


-- 

Hissam,
Flex Developer,
INDIA.
(m) +919860694301
If I CRY angels deserves to DIE.

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to