philadelphia-core: Make 'FIXCheckSums' package-private
This class was originally public in order to expose it to the
performance test, which itself used to be in another package.
Make it package-private as a part of the next major version,
Philadelphia 2.0.0, to clean up the public interface of the
library.
*/
package com.paritytrading.philadelphia;
-import java.nio.BufferUnderflowException;
import java.nio.ByteBuffer;
-/**
- * Utilities for working with checksums.
- */
-public class FIXCheckSums {
-
- private FIXCheckSums() {
- }
+class FIXCheckSums {
- /**
- * Return the sum of bytes in a buffer.
- *
- * @param buffer a buffer
- * @param offset the offset
- * @param length the length
- * @return the sum of bytes in the buffer
- * @throws BufferUnderflowException if the length from the offset exceeds
- * the limit of the buffer
- */
- public static long sum(ByteBuffer buffer, int offset, int length) {
+ static long sum(ByteBuffer buffer, int offset, int length) {
long sum = 0;
for (int i = offset; i < offset + length; i++)
