Class CompressedXContent

java.lang.Object
org.elasticsearch.common.compress.CompressedXContent

public final class CompressedXContent
extends java.lang.Object
Similar class to the String class except that it internally stores data using a compressed representation in order to require less permanent memory. Note that the compressed string might still sometimes need to be decompressed in order to perform equality checks or to compute hash codes.
  • Constructor Details

    • CompressedXContent

      public CompressedXContent​(org.elasticsearch.common.xcontent.ToXContent xcontent, org.elasticsearch.common.xcontent.XContentType type, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException
      Create a CompressedXContent out of a ToXContent instance.
      Throws:
      java.io.IOException
    • CompressedXContent

      public CompressedXContent​(BytesReference data) throws java.io.IOException
      Create a CompressedXContent out of a serialized ToXContent that may already be compressed.
      Throws:
      java.io.IOException
    • CompressedXContent

      public CompressedXContent​(byte[] data) throws java.io.IOException
      Throws:
      java.io.IOException
    • CompressedXContent

      public CompressedXContent​(java.lang.String str) throws java.io.IOException
      Throws:
      java.io.IOException
  • Method Details