Created static factory method for constructing a BitInput from a byte array

This commit is contained in:
Collin Smith 2020-08-08 11:50:59 -07:00
parent a244fbd09d
commit 99f0c11064

View File

@ -3,6 +3,10 @@ package com.riiablo.io.nio;
import org.apache.commons.lang3.StringUtils;
public class BitInput {
public static BitInput wrap(byte[] bytes) {
return ByteInput.wrap(bytes).unalign();
}
private static final int MAX_ULONG_BITS = Long.SIZE - 1;
private static final int MAX_UINT_BITS = Integer.SIZE - 1;
private static final int MAX_USHORT_BITS = Short.SIZE - 1;