writePaddedInteger(out, intValue, size); } else if (size <= 19) { out.write(Long.toString(value));
writePaddedInteger(out, intValue, size); } else if (size <= 19) { out.write(Long.toString(value));
public void printTo(Writer out, ReadablePeriod period, Locale locale) throws IOException { long valueLong = getFieldValue(period); if (valueLong == Long.MAX_VALUE) { return; } int value = (int) valueLong; if (iFieldType >= SECONDS_MILLIS) { value = (int) (valueLong / DateTimeConstants.MILLIS_PER_SECOND); } if (iPrefix != null) { iPrefix.printTo(out, value); } int minDigits = iMinPrintedDigits; if (minDigits <= 1) { FormatUtils.writeUnpaddedInteger(out, value); } else { FormatUtils.writePaddedInteger(out, value, minDigits); } if (iFieldType >= SECONDS_MILLIS) { int dp = (int) (Math.abs(valueLong) % DateTimeConstants.MILLIS_PER_SECOND); if (iFieldType == SECONDS_MILLIS || dp > 0) { out.write('.'); FormatUtils.writePaddedInteger(out, dp, 3); } } if (iSuffix != null) { iSuffix.printTo(out, value); } }
public void printTo(Writer out, ReadablePeriod period, Locale locale) throws IOException { long valueLong = getFieldValue(period); if (valueLong == Long.MAX_VALUE) { return; } int value = (int) valueLong; if (iFieldType >= SECONDS_MILLIS) { value = (int) (valueLong / DateTimeConstants.MILLIS_PER_SECOND); } if (iPrefix != null) { iPrefix.printTo(out, value); } int minDigits = iMinPrintedDigits; if (minDigits <= 1) { FormatUtils.writeUnpaddedInteger(out, value); } else { FormatUtils.writePaddedInteger(out, value, minDigits); } if (iFieldType >= SECONDS_MILLIS) { int dp = (int) (Math.abs(valueLong) % DateTimeConstants.MILLIS_PER_SECOND); if (iFieldType == SECONDS_MILLIS || dp > 0) { out.write('.'); FormatUtils.writePaddedInteger(out, dp, 3); } } if (iSuffix != null) { iSuffix.printTo(out, value); } }
public void printTo(Writer out, ReadablePartial partial, Locale locale) throws IOException { int year = getTwoDigitYear(partial); if (year < 0) { out.write('\ufffd'); out.write('\ufffd'); } else { FormatUtils.writePaddedInteger(out, year, 2); } }
public void printTo( Writer out, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, Locale locale) throws IOException { int year = getTwoDigitYear(instant, chrono); if (year < 0) { out.write('\ufffd'); out.write('\ufffd'); } else { FormatUtils.writePaddedInteger(out, year, 2); } }
FormatUtils.writePaddedInteger(out, hours, 2); if (iMaxFields == 1) { return; out.write(':'); FormatUtils.writePaddedInteger(out, minutes, 2); if (iMaxFields == 2) { return; out.write(':'); FormatUtils.writePaddedInteger(out, seconds, 2); if (iMaxFields == 3) { return; out.write('.'); FormatUtils.writePaddedInteger(out, displayOffset, 3);
writePaddedInteger(out, intValue, size); } else if (size <= 19) { out.write(Long.toString(value));
public void printTo(Writer out, ReadablePeriod period, Locale locale) throws IOException { long valueLong = getFieldValue(period); if (valueLong == Long.MAX_VALUE) { return; } int value = (int) valueLong; if (iFieldType >= SECONDS_MILLIS) { value = (int) (valueLong / DateTimeConstants.MILLIS_PER_SECOND); } if (iPrefix != null) { iPrefix.printTo(out, value); } int minDigits = iMinPrintedDigits; if (minDigits <= 1) { FormatUtils.writeUnpaddedInteger(out, value); } else { FormatUtils.writePaddedInteger(out, value, minDigits); } if (iFieldType >= SECONDS_MILLIS) { int dp = (int) (Math.abs(valueLong) % DateTimeConstants.MILLIS_PER_SECOND); if (iFieldType == SECONDS_MILLIS || dp > 0) { out.write('.'); FormatUtils.writePaddedInteger(out, dp, 3); } } if (iSuffix != null) { iSuffix.printTo(out, value); } }
public void printTo( Writer out, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, Locale locale) throws IOException { try { DateTimeField field = iFieldType.getField(chrono); FormatUtils.writePaddedInteger(out, field.get(instant), iMinPrintedDigits); } catch (RuntimeException e) { printUnknownString(out, iMinPrintedDigits); } }
public void printTo(Writer out, ReadablePartial partial, Locale locale) throws IOException { if (partial.isSupported(iFieldType)) { try { FormatUtils.writePaddedInteger(out, partial.get(iFieldType), iMinPrintedDigits); } catch (RuntimeException e) { printUnknownString(out, iMinPrintedDigits); } } else { printUnknownString(out, iMinPrintedDigits); } } }
public void printTo(Writer out, ReadablePartial partial, Locale locale) throws IOException { int year = getTwoDigitYear(partial); if (year < 0) { out.write('\ufffd'); out.write('\ufffd'); } else { FormatUtils.writePaddedInteger(out, year, 2); } }
public void printTo( Writer out, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, Locale locale) throws IOException { int year = getTwoDigitYear(instant, chrono); if (year < 0) { out.write('\ufffd'); out.write('\ufffd'); } else { FormatUtils.writePaddedInteger(out, year, 2); } }
public void printTo( Writer out, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, Locale locale) throws IOException { try { DateTimeField field = iFieldType.getField(chrono); FormatUtils.writePaddedInteger(out, field.get(instant), iMinPrintedDigits); } catch (RuntimeException e) { printUnknownString(out, iMinPrintedDigits); } }
public void printTo( Writer out, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, Locale locale) throws IOException { try { DateTimeField field = iFieldType.getField(chrono); FormatUtils.writePaddedInteger(out, field.get(instant), iMinPrintedDigits); } catch (RuntimeException e) { printUnknownString(out, iMinPrintedDigits); } }
public void printTo( Writer out, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, Locale locale) throws IOException { try { DateTimeField field = iFieldType.getField(chrono); FormatUtils.writePaddedInteger(out, field.get(instant), iMinPrintedDigits); } catch (RuntimeException e) { printUnknownString(out, iMinPrintedDigits); } }
public void printTo(Writer out, ReadablePartial partial, Locale locale) throws IOException { if (partial.isSupported(iFieldType)) { try { FormatUtils.writePaddedInteger(out, partial.get(iFieldType), iMinPrintedDigits); } catch (RuntimeException e) { printUnknownString(out, iMinPrintedDigits); } } else { printUnknownString(out, iMinPrintedDigits); } } }
public void printTo(Writer out, ReadablePartial partial, Locale locale) throws IOException { if (partial.isSupported(iFieldType)) { try { FormatUtils.writePaddedInteger(out, partial.get(iFieldType), iMinPrintedDigits); } catch (RuntimeException e) { printUnknownString(out, iMinPrintedDigits); } } else { printUnknownString(out, iMinPrintedDigits); } } }
public void printTo(Writer out, ReadablePartial partial, Locale locale) throws IOException { if (partial.isSupported(iFieldType)) { try { FormatUtils.writePaddedInteger(out, partial.get(iFieldType), iMinPrintedDigits); } catch (RuntimeException e) { printUnknownString(out, iMinPrintedDigits); } } else { printUnknownString(out, iMinPrintedDigits); } } }
public void printTo(Writer out, ReadablePartial partial, Locale locale) throws IOException { if (partial.isSupported(iFieldType)) { try { FormatUtils.writePaddedInteger(out, partial.get(iFieldType), iMinPrintedDigits); } catch (RuntimeException e) { printUnknownString(out, iMinPrintedDigits); } } else { printUnknownString(out, iMinPrintedDigits); } } }