This should be:

    int offset = 1 + (((tag & 0x0e0) << 8) | in.readUnsignedByte());