語言

DateTimeFormatter.FormatTo(ITemporalAccessor, IAppendable) 方法

定義

使用此格式化器將日期-時間物件格式化為 。Appendable

[Android.Runtime.Register("formatTo", "(Ljava/time/temporal/TemporalAccessor;Ljava/lang/Appendable;)V", "", ApiSince=26)]
public void FormatTo(Java.Time.Temporal.ITemporalAccessor? temporal, Java.Lang.IAppendable? appendable);
[<Android.Runtime.Register("formatTo", "(Ljava/time/temporal/TemporalAccessor;Ljava/lang/Appendable;)V", "", ApiSince=26)>]
member this.FormatTo : Java.Time.Temporal.ITemporalAccessor * Java.Lang.IAppendable -> unit

參數

temporal
ITemporalAccessor

時間物件 to format ,而非 null

appendable
IAppendable

附加的格式化,而非 null

屬性

備註

使用此格式化器將日期-時間物件格式化為 。Appendable

此系統會將格式化的日期時間輸出至指定的目的地。 Appendable是一個通用介面,由包括、StringBufferStringBuilderPrintStream和 在內Writer的所有關鍵字元輸出類別實作。

雖然 Appendable 方法拋出 , IOException但此方法不會拋出。 取而代之的是,任何 Run IOException 都會被 Runtime 例外包覆。

Java 文件 java.time.format.DateTimeFormatter.formatTo(java.time.temporal.TemporalAccessor, java.lang.Appendable)

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於