/** * Returns the size of paper used in the locale. The paper sizes returned are always in * <em>milli-meters</em>. * @param locale The locale for which the measurement system to be retrieved. * @return The paper size used in the locale * @stable ICU 3.0 */ public static final PaperSize getPaperSize(ULocale locale){ UResourceBundle obj = measurementTypeBundleForLocale(locale, PAPER_SIZE); int[] size = obj.getIntVector(); return new PaperSize(size[0], size[1]); }
/** * Returns the number of IDs in the equivalency group that * includes the given ID. An equivalency group contains zones * that behave identically to the given zone. * * <p>If there are no equivalent zones, then this method returns * 0. This means either the given ID is not a valid zone, or it * is and there are no other equivalent zones. * @param id a system time zone ID * @return the number of zones in the equivalency group containing * 'id', or zero if there are no equivalent zones. * @see #getEquivalentID */ public static synchronized int countEquivalentIDs(String id) { int count = 0; UResourceBundle res = openOlsonResource(null, id); if (res != null) { try { UResourceBundle links = res.get("links"); int[] v = links.getIntVector(); count = v.length; } catch (MissingResourceException ex) { // throw away } } return count; }
private static WeekData getWeekDataForRegionInternal(String region) { if (region == null) { region = "001"; } UResourceBundle rb = UResourceBundle.getBundleInstance( ICUData.ICU_BASE_NAME, "supplementalData", ICUResourceBundle.ICU_DATA_CLASS_LOADER); UResourceBundle weekDataInfo = rb.get("weekData"); UResourceBundle weekDataBundle = null; try { weekDataBundle = weekDataInfo.get(region); } catch (MissingResourceException mre) { if (!region.equals("001")) { // use "001" as fallback weekDataBundle = weekDataInfo.get("001"); } else { throw mre; } } int[] wdi = weekDataBundle.getIntVector(); return new WeekData(wdi[0],wdi[1],wdi[2],wdi[3],wdi[4],wdi[5]); }
try { UResourceBundle links = res.get("links"); int[] zones = links.getIntVector(); if (index < zones.length) { zoneIdx = zones[index];
transPre32 = r.getIntVector(); if (transPre32.length % 2 != 0) { trans32 = r.getIntVector(); transitionCount += trans32.length; } catch (MissingResourceException e) { transPost32 = r.getIntVector(); if (transPost32.length % 2 != 0) { typeOffsets = r.getIntVector(); if ((typeOffsets.length < 2 || typeOffsets.length > 0x7FFE || typeOffsets.length % 2 != 0)) { throw new IllegalArgumentException("Invalid Format"); int ruleRaw = r.getInt() * Grego.MILLIS_PER_SECOND; r = loadRule(top, ruleID); int[] ruleData = r.getIntVector();
while ( ctIterator.hasNext() ) { UResourceBundle contextTransformUsage = ctIterator.next(); int[] intVector = contextTransformUsage.getIntVector(); if (intVector.length >= 2) { String usageKey = contextTransformUsage.getKey();