52 |
System.out.println("Error on closing " + e.getMessage() ); |
System.out.println("Error on closing " + e.getMessage() ); |
53 |
} |
} |
54 |
} |
} |
55 |
|
/** |
56 |
|
* Reads the first line, validates that there are the expected number of fields, and then |
57 |
|
* re-initilze the inputstream - this is for file formats that does not use a header line. |
58 |
|
* |
59 |
|
* @param exptectedFieldCount |
60 |
|
* @param seperator |
61 |
|
* @throws IOException |
62 |
|
*/ |
63 |
protected void validatNoHeaderLine(int exptectedFieldCount, char seperator) throws IOException { |
protected void validatNoHeaderLine(int exptectedFieldCount, char seperator) throws IOException { |
64 |
try ( |
try ( |
65 |
InputStream is1 = file.getInputStream(); |
InputStream is1 = file.getInputStream(); |
84 |
br = new BufferedReader(isr); |
br = new BufferedReader(isr); |
85 |
} |
} |
86 |
|
|
87 |
|
|
88 |
protected void validateWithHeader(int expectedFieldCount, char seperator) throws IOException { |
protected void validateWithHeader(int expectedFieldCount, char seperator) throws IOException { |
89 |
try { |
try { |
90 |
is = file.getInputStream(); |
is = file.getInputStream(); |