Originally posted by latha selva:
actually i need to get the file length
java.io.File has a method for that.
and then split that file into 100kb file
read 100kb and write it to a file. Do that over and over until the input stream ends.
and pass it to queue and from queue another program collects that files
Presumably you are doing this now with the files you are creating. Nothing would change.
and merge all that splitted files into one file to get the original file size.
I'm unclear as to whether your program is merging the files, or if the other program is. If your program has to do it, it is simply the reverse of splitting the files. Open an output stream and read each of your 100kb inputs in turn.