Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-27-2009, 07:00 AM
Member
 
Join Date: Jun 2009
Posts: 1
Rep Power: 0
rueter is on a distinguished road
Smile Bit Wise operation: shifting
Hi,

I have an integer array of size 90, the content of which is 0's & 1's (Basically a binary stream saved in an integer array)

I need to process this data in 10 chucks, each of size 9, and prefix each chunk with a 7 bit data (0000000).

This means, the original 9-bit data in array index 0 to 8 would need to shift to index 7 to 14 and array index 0 to 6 would need to get filled with the 7 bit data (0000000).

Also this would cause the array size to increase from original size of 90 to 160 (original size of 90 + 10 times 7 bit data = 160)

How do I do this? Is there some kind of array bit wise shift possible?

Thank you - Rueter
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 06-27-2009, 07:51 AM
hardwired's Avatar
Senior Member
 
Join Date: Jul 2007
Posts: 1,561
Rep Power: 4
hardwired is on a distinguished road
Default
Check out the BitSet class.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shifting characters in array Mayur New To Java 2 04-24-2009 11:19 PM
How rmi preferable than http for Performance wise?? Kishore Kumar Enterprise JavaBeans 0 03-23-2009 01:18 PM
[Beginner]Eclipse RCP Undo/redo operation pollux Eclipse 2 02-18-2009 07:39 PM
[SOLVED] Shifting an array VeasMKII New To Java 2 02-04-2009 07:18 PM
Frame close operation Java Tip Java Tips 0 12-21-2007 09:39 AM


All times are GMT +2. The time now is 06:23 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org