Class Bytes

java.lang.Object
io.datarouter.model.util.Bytes
All Implemented Interfaces:
java.lang.Comparable<Bytes>

public class Bytes
extends java.lang.Object
implements java.lang.Comparable<Bytes>
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static Bytes EMPTY  
  • Constructor Summary

    Constructors 
    Constructor Description
    Bytes​(byte[] bytes)  
    Bytes​(byte[] bytes, int offset, int length)  
  • Method Summary

    Modifier and Type Method Description
    int compareTo​(Bytes other)  
    boolean equals​(java.lang.Object thatObject)  
    int getLength()  
    int hashCode()  
    byte[] toArray()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • Bytes

      public Bytes​(byte[] bytes)
    • Bytes

      public Bytes​(byte[] bytes, int offset, int length)
  • Method Details

    • getLength

      public int getLength()
    • toArray

      public byte[] toArray()
    • equals

      public boolean equals​(java.lang.Object thatObject)
      Overrides:
      equals in class java.lang.Object
    • hashCode

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

      public int compareTo​(Bytes other)
      Specified by:
      compareTo in interface java.lang.Comparable<Bytes>
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object