Java library for byte-array manipulations?

arrays, java

Solution

If you work with arrays of primitive types, the Guava library can help. See more in PrimitivesExplained - guava-libraries - Guava's primitives utilities, explained. - Guava: Google Core Libraries for Java 1.6+ - Google Project Hosting

The interesting class is `com.google.common.primitives.Bytes`

Problem

Is there a free library available that contains common methods for manipulating a byte array? It should be able to perform the following operations at least ob byte arrays but other array types would be nice, too: - Search for sub-array - Search and replace - Insert elements at a certain position - Delete sub-array at a certain position I know that all those functions are not high magic but implementing them completely and fool & error proof including the correspondent unit tests takes some time. Therefore I am searching for a (non-GPL) library that includes those functions. Does anybody know such a library?

Original source