I am creating a CSV file using BufferedWriter
from a ResultSet
object. A few of the database columns hold null
values.
When I call obj.write(rs.get())
I am getting a NullPointerException
when the output is null
. Is there any other class other than BufferedWriter
which I can use to overcome this.
I do not want to check for null
condition on the database columns since there is large number of columns. I am new to Java and tried searching for solution but could not find anything.