Skip to content

Commit

Permalink
fixed skipping of first 2 chars of input file
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmhess committed Nov 14, 2016
1 parent bec6e45 commit 6ff3c15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Expand Up @@ -3,4 +3,6 @@ build/
*~
*.jar
cassandra-loader

*.BADINSERT
*.BADPARSE
*.LOG
7 changes: 3 additions & 4 deletions src/main/java/com/datastax/loader/CqlDelimLoadTask.java
Expand Up @@ -153,13 +153,12 @@ private void setup() throws IOException, ParseException, org.json.simple.parser.
readerName = "stdin";
}
else {
FileInputStream fis = new FileInputStream(infile);
InputStream is = fis;
InputStream is = null;
try {
is = new GZIPInputStream(fis);
is = new GZIPInputStream(new FileInputStream(infile));
}
catch (ZipException e) {
is = fis;
is = new FileInputStream(infile);
}
reader = new BufferedReader(new InputStreamReader(is));
readerName = infile.getName();
Expand Down

0 comments on commit 6ff3c15

Please sign in to comment.