Class Buffer

java.lang.Object
org.jgroups.util.Buffer

public class Buffer extends Object
Buffer with an offset and length. Will be replaced with NIO equivalent once JDK 1.4 becomes baseline. This class is immutable. Note that the underlying byte[] buffer must not be changed as long as this Buffer instance is in use !
Author:
Bela Ban
  • Constructor Details

    • Buffer

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

      public Buffer(byte[] buf)
  • Method Details

    • getBuf

      public byte[] getBuf()
    • getOffset

      public int getOffset()
    • getLength

      public int getLength()
    • copy

      public Buffer copy()
    • toString

      public String toString()
      Overrides:
      toString in class Object