public static int[] bytesLE2tags(byte[] b) { if (b == null) return null; if ((b.length & 0x3) != 0) throw new IllegalArgumentException("byte[" + b.length + "]"); int[] val = new int[b.length >> 2]; for (int i = 0; i < val.length; i++) val[i] = bytesLE2tag(b, i << 2); return val; }
@Override public int toInt(byte[] val, boolean bigEndian) { if (val == null || val.length == 0) return 0; return bigEndian ? ByteUtils.bytesBE2tag(val, 0) : ByteUtils.bytesLE2tag(val, 0); }
readFully(header, 0, 8); tag = ts.bigEndian() ? ByteUtils.bytesBE2tag(header, 0) : ByteUtils .bytesLE2tag(header, 0); if (expectFmiEnd && !TagUtils.isFileMetaInfoElement(tag)) { log.warn("Missing or wrong (0002,0000) Group Length of File Meta Information"); ts = TransferSyntax.valueOf(tsuid); tag = ts.bigEndian() ? ByteUtils.bytesBE2tag(header, 0) : ByteUtils.bytesLE2tag(header, 0); } else { log
final int vrcode = ((b[4] & 0xff) << 8) | (b[5] & 0xff); VR vr; if ((vr = vrmap.vrOf(ByteUtils.bytesLE2tag(b, 0))) != VR.UN) { expectFmiEnd = b[0] == 2; return vrcode == vr.code() ? TransferSyntax.ExplicitVRLittleEndian