Take the 2-minute tour ×  I try make code by java able to read
100 kb from file then divide the file into blocks each block has
256 bit or 32 byte also I want conver each block to binary
format or integer format the following is it I need any suggest
public static void main(String[] args) {      ReadFileExample
newclass = new ReadFileExample();     System.out.println("
-----------Wellcome in ECC ENCRYPTION NEW--------");     File
clearmsg = new File("F:/java_projects/clearmsg.txt");     File
ciphermsg = new File("F:/java_projects/ciphermsg.txt");
byte[] block = new byte[32];             try {
FileInputStream fis = new FileInputStream(clearmsg);
FileOutputStream fos = new FileOutputStream(ciphermsg);
CipherOutputStream cos = new CipherOutputStream(fos);
System.out.println("Total file size to read (in bytes) : "
+ fis.available());         int i;         while ((i =
fis.read(block)) != -1) {             fos.write(block, 0, i);
share|improve this que