Class BytesArray

java.lang.Object
org.opensearch.common.bytes.AbstractBytesReference
org.opensearch.common.bytes.BytesArray
All Implemented Interfaces:
java.lang.Comparable<BytesReference>, BytesReference, org.opensearch.common.xcontent.ToXContent, org.opensearch.common.xcontent.ToXContentFragment

public final class BytesArray
extends AbstractBytesReference
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.opensearch.common.xcontent.ToXContent

    org.opensearch.common.xcontent.ToXContent.DelegatingMapParams, org.opensearch.common.xcontent.ToXContent.MapParams, org.opensearch.common.xcontent.ToXContent.Params
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static BytesArray EMPTY  

    Fields inherited from interface org.opensearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors 
    Constructor Description
    BytesArray​(byte[] bytes)  
    BytesArray​(byte[] bytes, int offset, int length)  
    BytesArray​(java.lang.String bytes)  
    BytesArray​(org.apache.lucene.util.BytesRef bytesRef)  
    BytesArray​(org.apache.lucene.util.BytesRef bytesRef, boolean deepCopy)  
  • Method Summary

    Modifier and Type Method Description
    byte[] array()  
    boolean equals​(java.lang.Object other)  
    byte get​(int index)
    Returns the byte at the specified index.
    int hashCode()  
    int length()
    The length.
    int offset()  
    long ramBytesUsed()
    The amount of memory used by this BytesReference
    BytesReference slice​(int from, int length)
    Slice the bytes from the from index up to length.
    StreamInput streamInput()
    A stream input of the bytes.
    org.apache.lucene.util.BytesRef toBytesRef()
    Converts to Lucene BytesRef.
    void writeTo​(java.io.OutputStream os)
    Writes the bytes directly to the output stream.

    Methods inherited from class org.opensearch.common.bytes.AbstractBytesReference

    compareTo, getInt, indexOf, iterator, toXContent, utf8ToString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.opensearch.common.xcontent.ToXContentFragment

    isFragment