|
@@ -65,7 +65,7 @@ public class XContentHelper {
|
|
public static XContentParser createParser(byte[] data, int offset, int length) throws IOException {
|
|
public static XContentParser createParser(byte[] data, int offset, int length) throws IOException {
|
|
Compressor compressor = CompressorFactory.compressor(data, offset, length);
|
|
Compressor compressor = CompressorFactory.compressor(data, offset, length);
|
|
if (compressor != null) {
|
|
if (compressor != null) {
|
|
- CompressedStreamInput compressedInput = compressor.streamInput(new BytesStreamInput(data, offset, length, false));
|
|
|
|
|
|
+ CompressedStreamInput compressedInput = compressor.streamInput(new BytesStreamInput(data, offset, length));
|
|
XContentType contentType = XContentFactory.xContentType(compressedInput);
|
|
XContentType contentType = XContentFactory.xContentType(compressedInput);
|
|
compressedInput.resetToBufferStart();
|
|
compressedInput.resetToBufferStart();
|
|
return XContentFactory.xContent(contentType).createParser(compressedInput);
|
|
return XContentFactory.xContent(contentType).createParser(compressedInput);
|
|
@@ -111,7 +111,7 @@ public class XContentHelper {
|
|
XContentType contentType;
|
|
XContentType contentType;
|
|
Compressor compressor = CompressorFactory.compressor(data, offset, length);
|
|
Compressor compressor = CompressorFactory.compressor(data, offset, length);
|
|
if (compressor != null) {
|
|
if (compressor != null) {
|
|
- CompressedStreamInput compressedStreamInput = compressor.streamInput(new BytesStreamInput(data, offset, length, false));
|
|
|
|
|
|
+ CompressedStreamInput compressedStreamInput = compressor.streamInput(new BytesStreamInput(data, offset, length));
|
|
contentType = XContentFactory.xContentType(compressedStreamInput);
|
|
contentType = XContentFactory.xContentType(compressedStreamInput);
|
|
compressedStreamInput.resetToBufferStart();
|
|
compressedStreamInput.resetToBufferStart();
|
|
parser = XContentFactory.xContent(contentType).createParser(compressedStreamInput);
|
|
parser = XContentFactory.xContent(contentType).createParser(compressedStreamInput);
|