/[projects]/dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/AbstractAddressSource.java
ViewVC logotype

Diff of /dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/AbstractAddressSource.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2869 by torben, Thu Jan 28 16:21:36 2016 UTC revision 2870 by torben, Thu Jan 28 16:24:53 2016 UTC
# Line 52  public abstract class AbstractAddressSou Line 52  public abstract class AbstractAddressSou
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();
# Line 77  public abstract class AbstractAddressSou Line 84  public abstract class AbstractAddressSou
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();

Legend:
Removed from v.2869  
changed lines
  Added in v.2870

  ViewVC Help
Powered by ViewVC 1.1.20