i need to split a file into several files, each having the same header/trailer as the orignal file, but each file only having 450 lines(including header and trailer so 448 lines from the orignal file).
for ex if there are 900 lines in the original file, that would be 3 files,
file 1 with header/trailer from Original, and 1 to 448 lines from Original file.
file 2 with header/trailer from Original, and 449 to 898 lines from Original file.
file 3 with header/trailer from Original, and 898 to 900 lines from Original file.
Welcome to JavaRanch
We don't simply give out that sort of answer, but if you tell us what you have achieved we shall be happy to help. What have you managed so far? Since you have provided a good description of your requirement, you should be able to get some method together easily.
Pseudo-code might be better; it allows you to see what is happening more easily.
i can iterate over the number of files to create then for each one create a new file, add the contents of the array from 1 to 448 to each one then would like to remove them from the array.
Since i cannot remove them from the array..How do i do this..put it into an arrayList..?
Another optiion is to have your method -- that writes out the array -- be able to have the start and end specified. This way, you don't have to change (ie, delete items) while you doing this. Just adjust the start and end for each file being written.