By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,786 Members | 1,263 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,786 IT Pros & Developers. It's quick & easy.

Enter a Value From a Text File Into The Matrix Per Row and Output Per Column in Java

P: 2
Hello guys, Iím making a program encryption and descryption data, I have a trouble in making matrix 16x16
by entering hexa from text file per row, e.g, value in a textfile, "abcdefghijklmnopqrstuvwxyz", then inserted into a matrix 4x4, for illustration
If capacity matrix already full, then issued per coloumn, thus, "aeimbfjncgkodhlp", then insert a value that remaining, and if condition value less than capacity matrix that available, program insert a character (*) until matrix is full and then reissued
thus, entire output value matrix is "aeimbfjncgkodhlpquy*rvx*sw**tx**", and lastly, remove character (*), so that a variable value can be brought to the next process.
this print screen hexa from text file
and I can only make this code
Expand|Select|Wrap|Line Numbers
  1.     fis = new FileInputStream("hexa.txt");
  2.     dis = new DataInputStream(fis);
  3.     br = new BufferedReader(new InputStreamReader(dis));
  4.     while ((hexaMatrix = br.readLine()) != null) {
  6.        //please complete this code
  8.     }
Iím sorry because I canít show the pictures directly, because when I show the pictures, but pictures do not appear
and all the assistance that you gave, I would appreciate it, thank you
Attached Images
File Type: png gambar2.png (3.9 KB, 378 views)
File Type: png gambar3.png (1.1 KB, 268 views)
File Type: jpg hexa.jpg (34.4 KB, 255 views)
Jan 15 '13 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 10K+
P: 12,422
This is not a code writing service but if you post the code you've tried along with a description of the problem, we can help guide you to a solution. While you have posted some code, the code you posted has no attempt whatsoever in trying to solve the problem.
Jan 15 '13 #2

P: 185
I'm a bit confused, is it 4*4 or 16*16 matrix?
Jan 15 '13 #3

Post your reply

Sign in to post your reply or Sign up for a free account.