Lines Matching refs:bytes
26 * Creates a 32-bit {@code HashCode}, of which the bytes will form the passed int, interpreted
62 * Creates a 64-bit {@code HashCode}, of which the bytes will form the passed long, interpreted
106 static HashCode fromBytes(byte[] bytes) {
107 return new BytesHashCode(bytes);
111 final byte[] bytes;
113 BytesHashCode(byte[] bytes) {
114 this.bytes = bytes;
118 return bytes.length * 8;
122 return bytes.clone();
126 return (bytes[0] & 0xFF)
127 | ((bytes[1] & 0xFF) << 8)
128 | ((bytes[2] & 0xFF) << 16)
129 | ((bytes[3] & 0xFF) << 24);
133 if (bytes.length < 8) {
135 throw new IllegalStateException("Not enough bytes");
137 return (bytes[0] & 0xFFL)
138 | ((bytes[1] & 0xFFL) << 8)
139 | ((bytes[2] & 0xFFL) << 16)
140 | ((bytes[3] & 0xFFL) << 24)
141 | ((bytes[4] & 0xFFL) << 32)
142 | ((bytes[5] & 0xFFL) << 40)
143 | ((bytes[6] & 0xFFL) << 48)
144 | ((bytes[7] & 0xFFL) << 56);