Parse once a prefix is established.

@param zoneId  the time-zone ID, not null
@param prefixLength  the length of the prefix, 2 or 3
@return the zone ID, not null
@throws DateTimeException if the zone ID has an invalid format
439339
private static ZoneId ofWithPrefix(String zoneId, int prefixLength, boolean checkAvailable) {
        String prefix = zoneId.substring(0, prefixLength);
        if (zoneId.length() == prefixLength) {
            return ofOffset(prefix, ZoneOffset.UTC);
        }
        if (zoneId.charAt(prefixLength) != '+' && zoneId.charAt(prefixLength) != '-') {
            return ZoneRegion.ofId(zoneId, checkAvailable);  // drop through to ZoneRulesProvider
        }
        try {
            ZoneOffset offset = ZoneOffset.of(zoneId.substring(prefixLength));
            if (offset == ZoneOffset.UTC) {
                return ofOffset(prefix, offset);
            }
            return ofOffset(prefix, offset);
        } catch (DateTimeException ex) {
            throw new DateTimeException("Invalid ID for offset-based ZoneId: " + zoneId, ex);
        }
    }
825192
public String resolveTimeZoneId(String zoneId) {
    String alias = _CalendarUtils.getTimeZoneAlias(zoneId);
    if (alias != null) {
      zoneId = alias;
    }
    alias = TimeZoneAliases.getAlias(zoneId);
    if (alias != null) {
      zoneId = alias;
    }
    return zoneId;
  }
230204
private static int parseNumber(CharSequence offsetId, int pos, boolean precededByColon) {
        if (precededByColon && offsetId.charAt(pos - 1) != ':') {
            throw new DateTimeException("Invalid ID for ZoneOffset, colon not found when expected: " + offsetId);
        }
        char ch1 = offsetId.charAt(pos);
        char ch2 = offsetId.charAt(pos + 1);
        if (ch1 < '0' || ch1 > '9' || ch2 < '0' || ch2 > '9') {
            throw new DateTimeException("Invalid ID for ZoneOffset, non numeric characters found: " + offsetId);
        }
        return (ch1 - 48) * 10 + (ch2 - 48);
    }
140576
public static String getPrettyMapOfContiguousPartitionRunLengths(final Cluster cluster,
                                                                     int zoneId) {
        Map<Integer, Integer> runLengthToCount = getMapOfContiguousPartitionRunLengths(cluster,
                                                                                       zoneId);
        String prettyHistogram = "[";
        boolean first = true;
        Set<Integer> runLengths = new TreeSet<Integer>(runLengthToCount.keySet());
        for(int runLength: runLengths) {
            if(first) {
                first = false;
            } else {
                prettyHistogram += ", ";
            }
            prettyHistogram += "{" + runLength + " : " + runLengthToCount.get(runLength) + "}";
        }
        prettyHistogram += "]";
        return prettyHistogram;
    }
1040110
void formatTimeZone_z(StringBuilder b, ZonedDateTime d, int width) {
    if (width > 4) {
      return;
    }

    ZoneId zone = d.getZone();
    ZoneRules zoneRules = null;
    try {
      zoneRules = zone.getRules();
    } catch (ZoneRulesException e) {
      // not expected, but catching for safety
      return;
    }
    
    boolean daylight = zoneRules.isDaylightSavings(d.toInstant());

    // Select long or short name variants and select the standard or daylight name.
    Name variants = getTimeZoneName(zone.getId(), d, width == 4);
    String name = variants == null ? null : (daylight ? variants.daylight() : variants.standard());

    switch (width) {
      case 4:
      {
        if (name != null) {
          b.append(name);
        } else {
          // Falls back to 'OOOO'
          formatTimeZone_O(b, d, 4);
        }
        break;
      }
        
      case 3:
      case 2:
      case 1:
      {
        if (name != null) {
          b.append(name);
        } else {
          // Falls back to 'O'
          formatTimeZone_O(b, d, 1);
        }
        break;
      }
    }
  }
436985
public static ZonedDateTime getZonedDataTime(long timestamp,
            String zoneId) {
        return Instant.ofEpochMilli(timestamp).atZone(getZoneId(zoneId));
    }
257928
int matchLength(List<CharRange> prefix)
    {
        DFAState<T> state = this;
        int len = 0;
        for (CharRange range : prefix)
        {
            state = state.transit(range);
            if (state == null)
            {
                break;
            }
            len++;
        }
        return len;
    }
752047
public static TimeZone getTimeZoneByIdIgnoreCase(String id)
    {
        TimeZone ret = null;
        if(timezones != null)
        {
            id = id.toLowerCase();
            for(int i = 0; i < timezones.length && ret == null; i++)
            {
                if(timezones[i].getId().toLowerCase().equals(id))
                    ret = timezones[i].getTimeZone();
            }
        }
        return ret;
    }
814472
def parse_prefix(identifier):
    
    pf, id = (), identifier
    if "|" in identifier:
        pf, id = tuple(identifier.split('|')[:-1]), identifier.split('|')[-1]

    return pf, id
53574
public static DateTime toDateTime(Instant instant, String timeZoneId) {
    return dateTimesHelper.toDateTime(instant, timeZoneId);
  }
115261
public static ZoneId toZoneId(TimeZone timeZone) {
        return ZoneId.of(timeZone.getID(), ZoneId.SHORT_IDS);
    }
194312
protected String getPropertyName(String methodName, int prefixLength) {
		return Character.toLowerCase(methodName.charAt(prefixLength)) + methodName.substring(prefixLength + 1);
	}
419399
public void formatField(ZonedDateTime datetime, String pattern, StringBuilder buffer) {
    int length = pattern.length();
    if (length == 0) {
      return;
    }

    // Current position in pattern
    int i = 0;

    // Skip over prefix indicating we want to format a single field.
    if (pattern.charAt(i) == '+') {
      if (length == 1) {
        return;
      }
      i++;
    }

    int width = 0;
    char field = pattern.charAt(i);
    while (i < length) {
      if (pattern.charAt(i) != field) {
        break;
      }
      width++;
      i++;
    }

    formatField(datetime, field, width, buffer);
  }
623637
public static long getId(int serverId)
	{
		synchronized (seq) {
			long second=System.currentTimeMillis()/1000;
			System.out.println("second:"+second);
			int inc=seq.incrementAndGet();
			System.out.println("inc:"+inc);
			return ((long)(serverId & 0xFFFF))<< 48 | 
					((second & 0x00000000FFFFFFFF) <<16) | (inc & 0x0000FFFF);
		}
	}
1080783
@Override
    protected final long ciphertextLength(long plaintextLength) {
        long cipherBlockSize = contentCryptoScheme.getBlockSizeInBytes();
        long offset = cipherBlockSize - (plaintextLength % cipherBlockSize);
        return plaintextLength + offset;
    }
665071
public static SimpleDateFormat getSimpleDateFormat(String dateFormat,
            String zoneId) {
        return JMMap.getOrPutGetNew(simpleDateFormatMap,
                buildSimpleDateFormatKey(dateFormat, zoneId),
                newSimpleDateFormatBuilder.apply(dateFormat, zoneId));
    }
961479
public static String changeFormatAndTimeZoneToDefaultUtcFormat(
            String dateFormat, String zoneId, String dateString) {
        return JMOptional.getOptional(zoneId)
                .map(zId -> getTimeAsDefaultUtcFormat(
                        changeTimestampToLong(dateFormat,
                                dateString, zoneId)))
                .orElseGet(() -> changeFormatAndTimeZoneToDefaultUtcFormat(
                        dateFormat, dateString));
    }