be.SIRAPRISE.util
Class MyByteBuffer

java.lang.Object
  extended by be.SIRAPRISE.util.MyByteBuffer

public class MyByteBuffer
extends java.lang.Object

Class to dump the contents of a ByteBuffer in hex

Author:
Erwin Smout

Constructor Summary
MyByteBuffer()
           
 
Method Summary
static boolean equalBytes(java.nio.ByteBuffer buffer1, java.nio.ByteBuffer buffer2)
          Returns true if two byte buffers have equal limits, plus equal bytes in all buffer positions before the limit
static java.lang.String toHex(java.nio.ByteBuffer byteBuffer)
          Builds a hexadecimal representation of the contents of any ByteBuffer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyByteBuffer

public MyByteBuffer()
Method Detail

equalBytes

public static boolean equalBytes(java.nio.ByteBuffer buffer1,
                                 java.nio.ByteBuffer buffer2)
Returns true if two byte buffers have equal limits, plus equal bytes in all buffer positions before the limit

Parameters:
buffer1 - The first buffer to be compared
buffer2 - The secondbuffer to be compared
Returns:
true if two byte buffers have equal limits, plus equal bytes in all buffer positions before the limit

toHex

public static java.lang.String toHex(java.nio.ByteBuffer byteBuffer)
Builds a hexadecimal representation of the contents of any ByteBuffer

Parameters:
byteBuffer - The bytebuffer
Returns:
the contents of the bytebuffer represented in hex