I have read a CSV into dataframe using java spark dataframe, now I have to apply some width to each colum and write that data into a fixed width file. For example..column 1 has 2 bit width, column 2 has 7 bit...like that I have 85 columns. Can someone explain me how can I wrote data in dataframe to a fixed width file using java spark. I need solution in java spark only