Byte Arrays


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Byte Arrays

  1. #1
    Join Date
    Apr 2003
    Posts
    2

    Byte Arrays

    I have an byte array that is stored in a file. I want to store this byte array and also another object in the file.

    The question I have is:

    I want to store an object in this file with the byte array, so when I do this, it stores the byte array and the object.

    But the problem that I get is for some weird reason it won't let me open the object, the byte array opens fine but it gives me an error when opening the object?

    any help or is this possible? or should I make the byte array part of that object, If I do this, how would I open the byte array?

    an easier way of explaining this would be here.....

    turn something to a byte array -> store into a file
    save an object -> store into that same file

    now how would I decode the byte array or how would the code know whats the object and whats the byte array.


    Thanks

  2. #2
    Join Date
    Mar 2003
    Posts
    86

    Serialize

    Just put the byte array as a member of the object.
    Then serialize the object to the file. It will be saved with it's member.

    Sharbov.

  3. #3
    Join Date
    Apr 2003
    Posts
    2

    worked!

    thanks that worked.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center