com.gc.iotools.stream.utils
Class ArrayTools

java.lang.Object
  extended by com.gc.iotools.stream.utils.ArrayTools

public final class ArrayTools
extends Object

Miscellaneous utilities for Arrays, i haven't found anywhere.

Since:
1.0.9
Version:
$Id: ArrayTools.java 529 2014-02-26 20:52:01Z gabriele.contini@gmail.com $
Author:
dvd.smnt

Method Summary
static int indexOf(byte[] src, byte[] contained)
          Find the index of the contained array in the src array.
static byte[] subarray(byte[] array, int startIndexInclusive, int endIndexExclusive)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

indexOf

public static int indexOf(byte[] src,
                          byte[] contained)
Find the index of the contained array in the src array.

Parameters:
src - Source array.
contained - Array to search for.
Returns:
position of the contained array or -1 if not found.

subarray

public static byte[] subarray(byte[] array,
                              int startIndexInclusive,
                              int endIndexExclusive)


Copyright © 2008–2014. All rights reserved.