/** * Encodes a built DateTimeZone to the given stream. Call readFrom to * decode the data into a DateTimeZone object. * * @param out the output stream to receive the encoded DateTimeZone * @since 1.5 (parameter added) */ public void writeTo(String zoneID, DataOutput out) throws IOException { // pass false so zone id is not written out DateTimeZone zone = toDateTimeZone(zoneID, false); if (zone instanceof FixedDateTimeZone) { out.writeByte('F'); // 'F' for fixed out.writeUTF(zone.getNameKey(0)); writeMillis(out, zone.getOffset(0)); writeMillis(out, zone.getStandardOffset(0)); } else { if (zone instanceof CachedDateTimeZone) { out.writeByte('C'); // 'C' for cached, precalculated zone = ((CachedDateTimeZone)zone).getUncachedZone(); } else { out.writeByte('P'); // 'P' for precalculated, uncached } ((PrecalculatedZone)zone).writeTo(out); } }
DateTimeZoneBuilder builder = new DateTimeZoneBuilder(); zone.addToBuilder(builder, iRuleSets); DateTimeZone tz = builder.toDateTimeZone(zone.iName, true); if (test(tz.getID(), tz)) { map.put(tz.getID(), tz); DateTimeZoneBuilder builder = new DateTimeZoneBuilder(); sourceZone.addToBuilder(builder, iRuleSets); DateTimeZone revived = builder.toDateTimeZone(alias, true); if (test(revived.getID(), revived)) { map.put(revived.getID(), revived);
/** * Encodes a built DateTimeZone to the given stream. Call readFrom to * decode the data into a DateTimeZone object. * * @param out the output stream to receive the encoded DateTimeZone * @since 1.5 (parameter added) */ public void writeTo(String zoneID, DataOutput out) throws IOException { // pass false so zone id is not written out DateTimeZone zone = toDateTimeZone(zoneID, false); if (zone instanceof FixedDateTimeZone) { out.writeByte('F'); // 'F' for fixed out.writeUTF(zone.getNameKey(0)); writeMillis(out, zone.getOffset(0)); writeMillis(out, zone.getStandardOffset(0)); } else { if (zone instanceof CachedDateTimeZone) { out.writeByte('C'); // 'C' for cached, precalculated zone = ((CachedDateTimeZone)zone).getUncachedZone(); } else { out.writeByte('P'); // 'P' for precalculated, uncached } ((PrecalculatedZone)zone).writeTo(out); } }
DateTimeZoneBuilder builder = new DateTimeZoneBuilder(); zone.addToBuilder(builder, iRuleSets); DateTimeZone tz = builder.toDateTimeZone(zone.iName, true); if (test(tz.getID(), tz)) { map.put(tz.getID(), tz); DateTimeZoneBuilder builder = new DateTimeZoneBuilder(); sourceZone.addToBuilder(builder, iRuleSets); DateTimeZone revived = builder.toDateTimeZone(alias, true); if (test(revived.getID(), revived)) { map.put(revived.getID(), revived);
DateTimeZoneBuilder builder = new DateTimeZoneBuilder(); zone.addToBuilder(builder, iRuleSets); final DateTimeZone original = builder.toDateTimeZone(zone.iName, true); DateTimeZone tz = original; if (test(tz.getID(), tz)) {
/** * Encodes a built DateTimeZone to the given stream. Call readFrom to * decode the data into a DateTimeZone object. * * @param out the output stream to receive the encoded DateTimeZone * @since 1.5 (parameter added) */ public void writeTo(String zoneID, DataOutput out) throws IOException { // pass false so zone id is not written out DateTimeZone zone = toDateTimeZone(zoneID, false); if (zone instanceof FixedDateTimeZone) { out.writeByte('F'); // 'F' for fixed out.writeUTF(zone.getNameKey(0)); writeMillis(out, zone.getOffset(0)); writeMillis(out, zone.getStandardOffset(0)); } else { if (zone instanceof CachedDateTimeZone) { out.writeByte('C'); // 'C' for cached, precalculated zone = ((CachedDateTimeZone)zone).getUncachedZone(); } else { out.writeByte('P'); // 'P' for precalculated, uncached } ((PrecalculatedZone)zone).writeTo(out); } }
DateTimeZoneBuilder builder = new DateTimeZoneBuilder(); zone.addToBuilder(builder, iRuleSets); final DateTimeZone original = builder.toDateTimeZone(zone.iName, true); DateTimeZone tz = original; if (test(tz.getID(), tz)) {
DateTimeZoneBuilder builder = new DateTimeZoneBuilder(); zone.addToBuilder(builder, iRuleSets); final DateTimeZone original = builder.toDateTimeZone(zone.iName, true); DateTimeZone tz = original; if (test(tz.getID(), tz)) {
DateTimeZoneBuilder builder = new DateTimeZoneBuilder(); zone.addToBuilder(builder, iRuleSets); final DateTimeZone original = builder.toDateTimeZone(zone.iName, true); DateTimeZone tz = original; if (test(tz.getID(), tz)) {
DateTimeZoneBuilder builder = new DateTimeZoneBuilder(); zone.addToBuilder(builder, iRuleSets); final DateTimeZone original = builder.toDateTimeZone(zone.iName, true); DateTimeZone tz = original; if (test(tz.getID(), tz)) {
DateTimeZoneBuilder builder = new DateTimeZoneBuilder(); zone.addToBuilder(builder, iRuleSets); final DateTimeZone original = builder.toDateTimeZone(zone.iName, true); DateTimeZone tz = original; if (test(tz.getID(), tz)) {
DateTimeZoneBuilder builder = new DateTimeZoneBuilder(); zone.addToBuilder(builder, iRuleSets); DateTimeZone tz = builder.toDateTimeZone(zone.iName, true); if (test(tz.getID(), tz)) { map.put(tz.getID(), tz); DateTimeZoneBuilder builder = new DateTimeZoneBuilder(); sourceZone.addToBuilder(builder, iRuleSets); DateTimeZone revived = builder.toDateTimeZone(alias, true); if (test(revived.getID(), revived)) { map.put(revived.getID(), revived);
/** * Encodes a built DateTimeZone to the given stream. Call readFrom to * decode the data into a DateTimeZone object. * * @param out the output stream to receive the encoded DateTimeZone * @since 1.5 (parameter added) */ public void writeTo(String zoneID, DataOutput out) throws IOException { // pass false so zone id is not written out DateTimeZone zone = toDateTimeZone(zoneID, false); if (zone instanceof FixedDateTimeZone) { out.writeByte('F'); // 'F' for fixed out.writeUTF(zone.getNameKey(0)); writeMillis(out, zone.getOffset(0)); writeMillis(out, zone.getStandardOffset(0)); } else { if (zone instanceof CachedDateTimeZone) { out.writeByte('C'); // 'C' for cached, precalculated zone = ((CachedDateTimeZone)zone).getUncachedZone(); } else { out.writeByte('P'); // 'P' for precalculated, uncached } ((PrecalculatedZone)zone).writeTo(out); } }
/** * Encodes a built DateTimeZone to the given stream. Call readFrom to * decode the data into a DateTimeZone object. * * @param out the output stream to receive the encoded DateTimeZone * @since 1.5 (parameter added) */ public void writeTo(String zoneID, DataOutput out) throws IOException { // pass false so zone id is not written out DateTimeZone zone = toDateTimeZone(zoneID, false); if (zone instanceof FixedDateTimeZone) { out.writeByte('F'); // 'F' for fixed out.writeUTF(zone.getNameKey(0)); writeMillis(out, zone.getOffset(0)); writeMillis(out, zone.getStandardOffset(0)); } else { if (zone instanceof CachedDateTimeZone) { out.writeByte('C'); // 'C' for cached, precalculated zone = ((CachedDateTimeZone)zone).getUncachedZone(); } else { out.writeByte('P'); // 'P' for precalculated, uncached } ((PrecalculatedZone)zone).writeTo(out); } }
/** * Encodes a built DateTimeZone to the given stream. Call readFrom to * decode the data into a DateTimeZone object. * * @param out the output stream to receive the encoded DateTimeZone * @since 1.5 (parameter added) */ public void writeTo(String zoneID, DataOutput out) throws IOException { // pass false so zone id is not written out DateTimeZone zone = toDateTimeZone(zoneID, false); if (zone instanceof FixedDateTimeZone) { out.writeByte('F'); // 'F' for fixed out.writeUTF(zone.getNameKey(0)); writeMillis(out, zone.getOffset(0)); writeMillis(out, zone.getStandardOffset(0)); } else { if (zone instanceof CachedDateTimeZone) { out.writeByte('C'); // 'C' for cached, precalculated zone = ((CachedDateTimeZone)zone).getUncachedZone(); } else { out.writeByte('P'); // 'P' for precalculated, uncached } ((PrecalculatedZone)zone).writeTo(out); } }
/** * Encodes a built DateTimeZone to the given stream. Call readFrom to * decode the data into a DateTimeZone object. * * @param out the output stream to receive the encoded DateTimeZone * @since 1.5 (parameter added) */ public void writeTo(String zoneID, DataOutput out) throws IOException { // pass false so zone id is not written out DateTimeZone zone = toDateTimeZone(zoneID, false); if (zone instanceof FixedDateTimeZone) { out.writeByte('F'); // 'F' for fixed out.writeUTF(zone.getNameKey(0)); writeMillis(out, zone.getOffset(0)); writeMillis(out, zone.getStandardOffset(0)); } else { if (zone instanceof CachedDateTimeZone) { out.writeByte('C'); // 'C' for cached, precalculated zone = ((CachedDateTimeZone)zone).getUncachedZone(); } else { out.writeByte('P'); // 'P' for precalculated, uncached } ((PrecalculatedZone)zone).writeTo(out); } }
/** * Encodes a built DateTimeZone to the given stream. Call readFrom to * decode the data into a DateTimeZone object. * * @param out the output stream to receive the encoded DateTimeZone * @since 1.5 (parameter added) */ public void writeTo(String zoneID, DataOutput out) throws IOException { // pass false so zone id is not written out DateTimeZone zone = toDateTimeZone(zoneID, false); if (zone instanceof FixedDateTimeZone) { out.writeByte('F'); // 'F' for fixed out.writeUTF(zone.getNameKey(0)); writeMillis(out, zone.getOffset(0)); writeMillis(out, zone.getStandardOffset(0)); } else { if (zone instanceof CachedDateTimeZone) { out.writeByte('C'); // 'C' for cached, precalculated zone = ((CachedDateTimeZone)zone).getUncachedZone(); } else { out.writeByte('P'); // 'P' for precalculated, uncached } ((PrecalculatedZone)zone).writeTo(out); } }
/** * Encodes a built DateTimeZone to the given stream. Call readFrom to * decode the data into a DateTimeZone object. * * @param out the output stream to receive the encoded DateTimeZone * @since 1.5 (parameter added) */ public void writeTo(String zoneID, DataOutput out) throws IOException { // pass false so zone id is not written out DateTimeZone zone = toDateTimeZone(zoneID, false); if (zone instanceof FixedDateTimeZone) { out.writeByte('F'); // 'F' for fixed out.writeUTF(zone.getNameKey(0)); writeMillis(out, zone.getOffset(0)); writeMillis(out, zone.getStandardOffset(0)); } else { if (zone instanceof CachedDateTimeZone) { out.writeByte('C'); // 'C' for cached, precalculated zone = ((CachedDateTimeZone)zone).getUncachedZone(); } else { out.writeByte('P'); // 'P' for precalculated, uncached } ((PrecalculatedZone)zone).writeTo(out); } }
/** * Encodes a built DateTimeZone to the given stream. Call readFrom to * decode the data into a DateTimeZone object. * * @param out the output stream to receive the encoded DateTimeZone * @since 1.5 (parameter added) */ public void writeTo(String zoneID, DataOutput out) throws IOException { // pass false so zone id is not written out DateTimeZone zone = toDateTimeZone(zoneID, false); if (zone instanceof FixedDateTimeZone) { out.writeByte('F'); // 'F' for fixed out.writeUTF(zone.getNameKey(0)); writeMillis(out, zone.getOffset(0)); writeMillis(out, zone.getStandardOffset(0)); } else { if (zone instanceof CachedDateTimeZone) { out.writeByte('C'); // 'C' for cached, precalculated zone = ((CachedDateTimeZone)zone).getUncachedZone(); } else { out.writeByte('P'); // 'P' for precalculated, uncached } ((PrecalculatedZone)zone).writeTo(out); } }
/** * Encodes a built DateTimeZone to the given stream. Call readFrom to * decode the data into a DateTimeZone object. * * @param out the output stream to receive the encoded DateTimeZone * @since 1.5 (parameter added) */ public void writeTo(String zoneID, DataOutput out) throws IOException { // pass false so zone id is not written out DateTimeZone zone = toDateTimeZone(zoneID, false); if (zone instanceof FixedDateTimeZone) { out.writeByte('F'); // 'F' for fixed out.writeUTF(zone.getNameKey(0)); writeMillis(out, zone.getOffset(0)); writeMillis(out, zone.getStandardOffset(0)); } else { if (zone instanceof CachedDateTimeZone) { out.writeByte('C'); // 'C' for cached, precalculated zone = ((CachedDateTimeZone)zone).getUncachedZone(); } else { out.writeByte('P'); // 'P' for precalculated, uncached } ((PrecalculatedZone)zone).writeTo(out); } }