Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data type for loads of binary data?

Status
Not open for further replies.

Sen7inel

IS-IT--Management
Feb 14, 2001
90
FI
I'm not trying to actually do anything like this right now, but this just crossed my mind: if I were to create a class that would encapsulate say a string as a name identifier and lots of binary data, like a picture, how would I do that without direct memory access and pointers?
 
If the class is specifically designed to hold an image, all it would need is a String and an ImageIcon property.

public class Thingy
{
String s;
ImageIcon im;

public Thingy ( String s, ImageIcon im )
{
this.s = s;
this.im = im;
}
}

A more generic version might use a byte array, I suppose, if you wanted to store program binaries or something...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top