org.jgroups.util
Class Buffer

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

public class Buffer
extends java.lang.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 Summary
Buffer(byte[] buf)
           
Buffer(byte[] buf, int offset, int length)
           
 
Method Summary
 Buffer copy()
           
 byte[] getBuf()
           
 int getLength()
           
 int getOffset()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Buffer

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

Buffer

public Buffer(byte[] buf)
Method Detail

getBuf

public byte[] getBuf()

getOffset

public int getOffset()

getLength

public int getLength()

copy

public Buffer copy()

toString

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


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.