granularity level: instruction
.class final Lcom/google/firebase/encoders/json/JsonDataEncoderBuilder$TimestampEncoder;
.super Ljava/lang/Object;
.source "JsonDataEncoderBuilder.java"
.implements Lcom/google/firebase/encoders/ValueEncoder;
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/firebase/encoders/json/JsonDataEncoderBuilder;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1a
name = "TimestampEncoder"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Lcom/google/firebase/encoders/ValueEncoder<",
"Ljava/util/Date;",
">;"
}
.end annotation
.field private static final rfc339:Ljava/text/DateFormat;
.method static constructor <clinit>()V
.locals 3
new-instance v0, Ljava/text/SimpleDateFormat;
sget-object v1, Ljava/util/Locale;->US:Ljava/util/Locale;
const-string v2, "yyyy-MM-dd\'T\'HH:mm:ss.SSS\'Z\'"
invoke-direct {v0, v2, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
sput-object v0, Lcom/google/firebase/encoders/json/JsonDataEncoderBuilder$TimestampEncoder;->rfc339:Ljava/text/DateFormat;
const-string v1, "UTC"
invoke-static {v1}, Ljava/util/TimeZone;->getTimeZone(Ljava/lang/String;)Ljava/util/TimeZone;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/text/DateFormat;->setTimeZone(Ljava/util/TimeZone;)V
return-void
.end method
.method private constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method synthetic constructor <init>(Lcom/google/firebase/encoders/json/JsonDataEncoderBuilder$1;)V
.locals 0
invoke-direct {p0}, Lcom/google/firebase/encoders/json/JsonDataEncoderBuilder$TimestampEncoder;-><init>()V
return-void
.end method
.method public bridge synthetic encode(Ljava/lang/Object;Ljava/lang/Object;)V
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
check-cast p1, Ljava/util/Date;
check-cast p2, Lcom/google/firebase/encoders/ValueEncoderContext;
invoke-virtual {p0, p1, p2}, Lcom/google/firebase/encoders/json/JsonDataEncoderBuilder$TimestampEncoder;->encode(Ljava/util/Date;Lcom/google/firebase/encoders/ValueEncoderContext;)V
return-void
.end method
.method public encode(Ljava/util/Date;Lcom/google/firebase/encoders/ValueEncoderContext;)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
sget-object v0, Lcom/google/firebase/encoders/json/JsonDataEncoderBuilder$TimestampEncoder;->rfc339:Ljava/text/DateFormat;
invoke-virtual {v0, p1}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object p1
invoke-interface {p2, p1}, Lcom/google/firebase/encoders/ValueEncoderContext;->add(Ljava/lang/String;)Lcom/google/firebase/encoders/ValueEncoderContext;
return-void
.end method