DashMediaSource$Iso8601Parser.smali
.class final Lcom/google/android/exoplayer2/source/dash/DashMediaSource$Iso8601Parser;
.super Ljava/lang/Object;
.source "DashMediaSource.java"
# interfaces
.implements Lcom/google/android/exoplayer2/upstream/ParsingLoadable$Parser;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/android/exoplayer2/source/dash/DashMediaSource;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1a
name = "Iso8601Parser"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Lcom/google/android/exoplayer2/upstream/ParsingLoadable$Parser<",
"Ljava/lang/Long;",
">;"
}
.end annotation
# direct methods
.method private constructor <init>()V
.registers 1
.line 773
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method synthetic constructor <init>(Lcom/google/android/exoplayer2/source/dash/DashMediaSource$1;)V
.registers 2
.line 773
invoke-direct {p0}, Lcom/google/android/exoplayer2/source/dash/DashMediaSource$Iso8601Parser;-><init>()V
return-void
.end method
# virtual methods
.method public parse(Landroid/net/Uri;Ljava/io/InputStream;)Ljava/lang/Long;
.registers 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 777
new-instance p1, Ljava/io/BufferedReader;
new-instance v0, Ljava/io/InputStreamReader;
invoke-direct {v0, p2}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V
invoke-direct {p1, v0}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
invoke-virtual {p1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
move-result-object p1
.line 780
:try_start_e
new-instance p2, Ljava/text/SimpleDateFormat;
const-string/jumbo v0, "yyyy-MM-dd\'T\'HH:mm:ss\'Z\'"
sget-object v1, Ljava/util/Locale;->US:Ljava/util/Locale;
invoke-direct {p2, v0, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
const-string v0, "UTC"
.line 781
invoke-static {v0}, Ljava/util/TimeZone;->getTimeZone(Ljava/lang/String;)Ljava/util/TimeZone;
move-result-object v0
invoke-virtual {p2, v0}, Ljava/text/SimpleDateFormat;->setTimeZone(Ljava/util/TimeZone;)V
.line 782
invoke-virtual {p2, p1}, Ljava/text/SimpleDateFormat;->parse(Ljava/lang/String;)Ljava/util/Date;
move-result-object p1
invoke-virtual {p1}, Ljava/util/Date;->getTime()J
move-result-wide p1
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p1
:try_end_2d
.catch Ljava/text/ParseException; {:try_start_e .. :try_end_2d} :catch_2e
return-object p1
:catch_2e
move-exception p1
.line 784
new-instance p2, Lcom/google/android/exoplayer2/ParserException;
invoke-direct {p2, p1}, Lcom/google/android/exoplayer2/ParserException;-><init>(Ljava/lang/Throwable;)V
throw p2
.end method
.method public bridge synthetic parse(Landroid/net/Uri;Ljava/io/InputStream;)Ljava/lang/Object;
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 773
invoke-virtual {p0, p1, p2}, Lcom/google/android/exoplayer2/source/dash/DashMediaSource$Iso8601Parser;->parse(Landroid/net/Uri;Ljava/io/InputStream;)Ljava/lang/Long;
move-result-object p1
return-object p1
.end method