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 ToXContentObject>
java.lang.Stringdeflate(T objectToCompress)
static <T> T
inflate(java.lang.String compressedString, CheckedFunction<XContentParser,T,java.io.IOException> parserFunction, NamedXContentRegistry xContentRegistry)
-
Method Details
-
deflate
public static <T extends 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, CheckedFunction<XContentParser,T,java.io.IOException> parserFunction, NamedXContentRegistry xContentRegistry) throws java.io.IOException- Throws:
java.io.IOException
-