return false;
}
input.mark(4);
-
+
// get first 2 bytes or return false
byte[] bytes = new byte[2];
int read = input.read(bytes);
{
return false;
}
-
+
int header = (bytes[0] & 0xff) | ((bytes[1] << 8) & 0xff00);
return (GZIPInputStream.GZIP_MAGIC == header);
}
BufferedReader inData = new BufferedReader(
new InputStreamReader(new GZIPInputStream(inputStream)));
inData.mark(2048);
+ System.out.println("ABOUT TO inData.read()");
inData.read();
+ System.out.println("ABOUT TO inData.reset()");
inData.reset();
return inData;
}
{
// this will be from JavaScript
inFile = file;
- dataIn = new BufferedReader(
- new InputStreamReader(new ByteArrayInputStream(bytes)));
+ // dataIn = new BufferedReader(new InputStreamReader(new
+ // ByteArrayInputStream(bytes)));
+ try
+ {
+ dataIn = checkForGzipStream(new ByteArrayInputStream(bytes));
+ } catch (Exception e)
+ {
+ e.printStackTrace();
+ }
dataName = fileStr;
}
else if (checkFileSource(fileStr))