org.elasticsearch.common
Class BytesHolder

java.lang.Object
  extended by org.elasticsearch.common.BytesHolder
All Implemented Interfaces:
Streamable

public class BytesHolder
extends java.lang.Object
implements Streamable


Constructor Summary
BytesHolder(byte[] bytes)
           
BytesHolder(byte[] bytes, int offset, int length)
           
 
Method Summary
 byte[] bytes()
           
 boolean bytesEquals(BytesHolder other)
           
 byte[] copyBytes()
           
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 int length()
           
 int offset()
           
static BytesHolder readBytesHolder(StreamInput in)
           
 void readFrom(StreamInput in)
           
 void writeTo(StreamOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BytesHolder

public BytesHolder(byte[] bytes)

BytesHolder

public BytesHolder(byte[] bytes,
                   int offset,
                   int length)
Method Detail

copyBytes

public byte[] copyBytes()

bytes

public byte[] bytes()

offset

public int offset()

length

public int length()

readBytesHolder

public static BytesHolder readBytesHolder(StreamInput in)
                                   throws java.io.IOException
Throws:
java.io.IOException

readFrom

public void readFrom(StreamInput in)
              throws java.io.IOException
Specified by:
readFrom in interface Streamable
Throws:
java.io.IOException

writeTo

public void writeTo(StreamOutput out)
             throws java.io.IOException
Specified by:
writeTo in interface Streamable
Throws:
java.io.IOException

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

bytesEquals

public boolean bytesEquals(BytesHolder other)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object