Class InferenceToXContentCompressor
java.lang.Object
org.elasticsearch.client.ml.inference.InferenceToXContentCompressor
public final class InferenceToXContentCompressor
extends java.lang.Object
Collection of helper methods. Similar to CompressedXContent, but this utilizes GZIP.
-
Method Summary
Modifier and Type Method Description static <T extends org.elasticsearch.common.xcontent.ToXContentObject>
java.lang.Stringdeflate(T objectToCompress)
static <T> T
inflate(java.lang.String compressedString, org.elasticsearch.common.CheckedFunction<org.elasticsearch.common.xcontent.XContentParser,T,java.io.IOException> parserFunction, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
deflate
public static <T extends org.elasticsearch.common.xcontent.ToXContentObject> java.lang.String deflate(T objectToCompress) throws java.io.IOException- Throws:
java.io.IOException
-
inflate
public static <T> T inflate(java.lang.String compressedString, org.elasticsearch.common.CheckedFunction<org.elasticsearch.common.xcontent.XContentParser,T,java.io.IOException> parserFunction, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry) throws java.io.IOException- Throws:
java.io.IOException
-