Class Buffer

java.lang.Object
org.apache.activemq.protobuf.Buffer
All Implemented Interfaces:
Comparable<Buffer>
Direct Known Subclasses:
AsciiBuffer, UTF8Buffer

public class Buffer extends Object implements Comparable<Buffer>
  • Field Details

    • data

      public final byte[] data
    • offset

      public final int offset
    • length

      public final int length
  • Constructor Details

    • Buffer

      public Buffer(Buffer other)
    • Buffer

      public Buffer(byte[] data)
    • Buffer

      public Buffer(byte[] data, int offset, int length)
    • Buffer

      @Deprecated public Buffer(String value)
      Deprecated.
  • Method Details

    • slice

      public final Buffer slice(int low, int high)
    • getData

      public final byte[] getData()
    • getLength

      public final int getLength()
    • getOffset

      public final int getOffset()
    • compact

      public Buffer compact()
    • toByteArray

      public final byte[] toByteArray()
    • byteAt

      public byte byteAt(int i)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equals

      public final boolean equals(Buffer obj)
    • newInput

      public final BufferInputStream newInput()
    • newOutput

      public final BufferOutputStream newOutput()
    • isEmpty

      public final boolean isEmpty()
    • contains

      public final boolean contains(byte value)
    • indexOf

      public final int indexOf(byte value, int pos)
    • join

      public static final Buffer join(List<Buffer> items, Buffer seperator)
    • toStringUtf8

      @Deprecated public String toStringUtf8()
      Deprecated.
    • compareTo

      public int compareTo(Buffer o)
      Specified by:
      compareTo in interface Comparable<Buffer>