aspose file tools*
The moose likes JDBC and the fly likes BitSet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "BitSet" Watch "BitSet" New topic
Author

BitSet

moh sak
Ranch Hand

Joined: May 11, 2005
Posts: 78
Hi every one,

I want to know can i get data from the resultSet lets say a string and put it in a bitset ?? i need to do that because i'm dealing with large database and need to reduce the memory cost !?

thanx in advance.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42919
    
  68
What kind of data do you have in your ResultSet? Booleans? BitSet stores a number of single bits (unless you wanted to do some creative bit manipulation, and store integers).
I'm also unclear on where you want to conserve memory - in the DB or in RAM? In the DB, a BitSet would probably be stored as a BLOB, which most likely is not going to save space over storing booleans.
But it's all tough to answer because you don't provide details on what you're trying to accomplish.
loay saada
Greenhorn

Joined: Jul 13, 2005
Posts: 1
well,
in the question above i mean the cost of memory for the RAM,i get data of table as ResultSet and i do (while.next) to get these data, but i was finding this loop cost and west my time cos" maybe the data in the table is 10,0000000, if i want to add the resultSet to ArrayList maybe the memory will be full, so i am thinking to add all the data in BitSet, my question is, is there is a way to do that cos" i have String data in that table not just integer
any help
thanks
moh sak
Ranch Hand

Joined: May 11, 2005
Posts: 78
Hi,
I mean the cost of memory for the RAM,i get data from table as ResultSet and i do (while.next) to get these data, but i was finding this loop cost and waist my time, maybe the data in the table is 10,0000000, if i want to add the resultSet to ArrayList maybe the memory will be full, so i am thinking to add all the data in BitSet, my question is, is there any way to do that because i have String data in that table not just integer
any help
thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: BitSet