org.neociclo.odetteftp.util
Class BufferUtil

java.lang.Object
  extended by org.neociclo.odetteftp.util.BufferUtil

public class BufferUtil
extends Object

Version:
$Rev: 594 $ $Date: 2010-08-13 13:09:42 -0300 (Fri, 13 Aug 2010) $
Author:
Rafael Marins

Constructor Summary
BufferUtil()
           
 
Method Summary
static void bufferSkip(ByteBuffer buffer, int count)
           
static int getRepeatSequenceCount(ByteBuffer buffer, int limitCount)
           
static int seekRepeatSequence(ByteBuffer buffer, int limitCount, int minRepeat)
           
static int seekWithinBuffer(byte[] pattern, ByteBuffer buffer, int limitCount)
           
static String toHexString(byte b)
           
static String toHexString(byte[] barray)
           
static String toHexString(byte[] barray, int max)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferUtil

public BufferUtil()
Method Detail

bufferSkip

public static void bufferSkip(ByteBuffer buffer,
                              int count)

toHexString

public static String toHexString(byte b)

toHexString

public static String toHexString(byte[] barray)

toHexString

public static String toHexString(byte[] barray,
                                 int max)

seekWithinBuffer

public static int seekWithinBuffer(byte[] pattern,
                                   ByteBuffer buffer,
                                   int limitCount)

seekRepeatSequence

public static int seekRepeatSequence(ByteBuffer buffer,
                                     int limitCount,
                                     int minRepeat)
Parameters:
buffer -
limitCount -
minRepeat -
Returns:
The start position of sequence repetition in the buffer. Returns -1 if no repeat sequence is found.

getRepeatSequenceCount

public static int getRepeatSequenceCount(ByteBuffer buffer,
                                         int limitCount)


ACCORD