Sorry but it is not working. Probably just I am not good java developer.
I am getting all 3 objects (1,2, line) as separate files
Thanks for your help again