I'm having a file with binary Unicode (mean file contain Unicode value of corresponding data (text file)), want to divide that as blocks with the size of 144bits. I don't know how to code for this so please kindly help me.

February 13th, 2014, 08:46 AM

Norm

Re: Block division

What have you tried?

Can you read the file as bytes: 144/8 at a time?

February 16th, 2014, 09:33 AM

Jiji joby

Re: Block division

Of course, we can read it as bytes too.So we will get 18 bytes. Can you please help me in that coding for block division?

February 16th, 2014, 09:37 AM

Norm

Re: Block division

What have you tried? The FileInputStream class has method for reading bytes.

February 21st, 2014, 12:43 AM

Jiji joby

Re: Block division

I have used FileInputStream class but its not working properly to divide the bits into blocks.I will attach the coding,help me out to fix the problem.
public static void main(String[] args) {

The error is that the code could not block divide the bits. It just reads the bits from the input file and writes the same as it is to the input text file without dividing them into blocks. Error appears in the 'while loop' too. What's wrong in that?

February 21st, 2014, 09:55 AM

Norm

Re: Block division

Quote:

Error appears

Please copy the full text of the error message and paste it here. You need to fix the error before you can test the code.