This commit is contained in:
2022-06-10 21:38:30 +09:00
commit 27f5152838
51323 changed files with 12934539 additions and 0 deletions
@@ -0,0 +1,96 @@
.class public Lcom/amazonaws/event/ProgressEvent;
.super Ljava/lang/Object;
.source "ProgressEvent.java"
# static fields
.field public static final CANCELED_EVENT_CODE:I = 0x10
.field public static final COMPLETED_EVENT_CODE:I = 0x4
.field public static final FAILED_EVENT_CODE:I = 0x8
.field public static final PART_COMPLETED_EVENT_CODE:I = 0x800
.field public static final PART_FAILED_EVENT_CODE:I = 0x1000
.field public static final PART_STARTED_EVENT_CODE:I = 0x400
.field public static final PREPARING_EVENT_CODE:I = 0x1
.field public static final RESET_EVENT_CODE:I = 0x20
.field public static final STARTED_EVENT_CODE:I = 0x2
# instance fields
.field public bytesTransferred:J
.field public eventCode:I
# direct methods
.method public constructor <init>(IJ)V
.locals 0
.line 3
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 4
iput p1, p0, Lcom/amazonaws/event/ProgressEvent;->eventCode:I
.line 5
iput-wide p2, p0, Lcom/amazonaws/event/ProgressEvent;->bytesTransferred:J
return-void
.end method
.method public constructor <init>(J)V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-wide p1, p0, Lcom/amazonaws/event/ProgressEvent;->bytesTransferred:J
return-void
.end method
# virtual methods
.method public getBytesTransferred()J
.locals 2
.line 1
iget-wide v0, p0, Lcom/amazonaws/event/ProgressEvent;->bytesTransferred:J
return-wide v0
.end method
.method public getEventCode()I
.locals 1
.line 1
iget v0, p0, Lcom/amazonaws/event/ProgressEvent;->eventCode:I
return v0
.end method
.method public setBytesTransferred(J)V
.locals 0
.line 1
iput-wide p1, p0, Lcom/amazonaws/event/ProgressEvent;->bytesTransferred:J
return-void
.end method
.method public setEventCode(I)V
.locals 0
.line 1
iput p1, p0, Lcom/amazonaws/event/ProgressEvent;->eventCode:I
return-void
.end method
@@ -0,0 +1,8 @@
.class public interface abstract Lcom/amazonaws/event/ProgressListener;
.super Ljava/lang/Object;
.source "ProgressListener.java"
# virtual methods
.method public abstract progressChanged(Lcom/amazonaws/event/ProgressEvent;)V
.end method
@@ -0,0 +1,53 @@
.class final Lcom/amazonaws/event/ProgressListenerCallbackExecutor$1;
.super Ljava/lang/Object;
.source "ProgressListenerCallbackExecutor.java"
# interfaces
.implements Ljava/lang/Runnable;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->progressChanged(Lcom/amazonaws/event/ProgressListener;Lcom/amazonaws/event/ProgressEvent;)Ljava/util/concurrent/Future;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = null
.end annotation
# instance fields
.field public final synthetic val$listener:Lcom/amazonaws/event/ProgressListener;
.field public final synthetic val$progressEvent:Lcom/amazonaws/event/ProgressEvent;
# direct methods
.method public constructor <init>(Lcom/amazonaws/event/ProgressListener;Lcom/amazonaws/event/ProgressEvent;)V
.locals 0
.line 1
iput-object p1, p0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor$1;->val$listener:Lcom/amazonaws/event/ProgressListener;
iput-object p2, p0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor$1;->val$progressEvent:Lcom/amazonaws/event/ProgressEvent;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public run()V
.locals 2
.line 1
iget-object v0, p0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor$1;->val$listener:Lcom/amazonaws/event/ProgressListener;
iget-object v1, p0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor$1;->val$progressEvent:Lcom/amazonaws/event/ProgressEvent;
invoke-interface {v0, v1}, Lcom/amazonaws/event/ProgressListener;->progressChanged(Lcom/amazonaws/event/ProgressEvent;)V
return-void
.end method
@@ -0,0 +1,57 @@
.class Lcom/amazonaws/event/ProgressListenerCallbackExecutor$2;
.super Ljava/lang/Object;
.source "ProgressListenerCallbackExecutor.java"
# interfaces
.implements Ljava/lang/Runnable;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->progressChanged(Lcom/amazonaws/event/ProgressEvent;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Lcom/amazonaws/event/ProgressListenerCallbackExecutor;
.field public final synthetic val$progressEvent:Lcom/amazonaws/event/ProgressEvent;
# direct methods
.method public constructor <init>(Lcom/amazonaws/event/ProgressListenerCallbackExecutor;Lcom/amazonaws/event/ProgressEvent;)V
.locals 0
.line 1
iput-object p1, p0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor$2;->this$0:Lcom/amazonaws/event/ProgressListenerCallbackExecutor;
iput-object p2, p0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor$2;->val$progressEvent:Lcom/amazonaws/event/ProgressEvent;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public run()V
.locals 2
.line 1
iget-object v0, p0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor$2;->this$0:Lcom/amazonaws/event/ProgressListenerCallbackExecutor;
invoke-static {v0}, Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->access$000(Lcom/amazonaws/event/ProgressListenerCallbackExecutor;)Lcom/amazonaws/event/ProgressListener;
move-result-object v0
iget-object v1, p0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor$2;->val$progressEvent:Lcom/amazonaws/event/ProgressEvent;
invoke-interface {v0, v1}, Lcom/amazonaws/event/ProgressListener;->progressChanged(Lcom/amazonaws/event/ProgressEvent;)V
return-void
.end method
@@ -0,0 +1,51 @@
.class final Lcom/amazonaws/event/ProgressListenerCallbackExecutor$3;
.super Ljava/lang/Object;
.source "ProgressListenerCallbackExecutor.java"
# interfaces
.implements Ljava/util/concurrent/ThreadFactory;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->createNewExecutorService()Ljava/util/concurrent/ExecutorService;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = null
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public newThread(Ljava/lang/Runnable;)Ljava/lang/Thread;
.locals 1
.line 1
new-instance v0, Ljava/lang/Thread;
invoke-direct {v0, p1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V
const-string p1, "android-sdk-progress-listener-callback-thread"
.line 2
invoke-virtual {v0, p1}, Ljava/lang/Thread;->setName(Ljava/lang/String;)V
const/4 p1, 0x1
.line 3
invoke-virtual {v0, p1}, Ljava/lang/Thread;->setDaemon(Z)V
return-object v0
.end method
@@ -0,0 +1,174 @@
.class public Lcom/amazonaws/event/ProgressListenerCallbackExecutor;
.super Ljava/lang/Object;
.source "ProgressListenerCallbackExecutor.java"
# static fields
.field public static executor:Ljava/util/concurrent/ExecutorService;
# instance fields
.field private final listener:Lcom/amazonaws/event/ProgressListener;
# direct methods
.method public static constructor <clinit>()V
.locals 1
.line 1
invoke-static {}, Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->createNewExecutorService()Ljava/util/concurrent/ExecutorService;
move-result-object v0
sput-object v0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->executor:Ljava/util/concurrent/ExecutorService;
return-void
.end method
.method public constructor <init>()V
.locals 1
.line 3
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, 0x0
.line 4
iput-object v0, p0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->listener:Lcom/amazonaws/event/ProgressListener;
return-void
.end method
.method public constructor <init>(Lcom/amazonaws/event/ProgressListener;)V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-object p1, p0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->listener:Lcom/amazonaws/event/ProgressListener;
return-void
.end method
.method public static synthetic access$000(Lcom/amazonaws/event/ProgressListenerCallbackExecutor;)Lcom/amazonaws/event/ProgressListener;
.locals 0
.line 1
iget-object p0, p0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->listener:Lcom/amazonaws/event/ProgressListener;
return-object p0
.end method
.method public static createNewExecutorService()Ljava/util/concurrent/ExecutorService;
.locals 1
.line 1
new-instance v0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor$3;
invoke-direct {v0}, Lcom/amazonaws/event/ProgressListenerCallbackExecutor$3;-><init>()V
invoke-static {v0}, Ljava/util/concurrent/Executors;->newSingleThreadExecutor(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;
move-result-object v0
return-object v0
.end method
.method public static getExecutorService()Ljava/util/concurrent/ExecutorService;
.locals 1
.line 1
sget-object v0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->executor:Ljava/util/concurrent/ExecutorService;
return-object v0
.end method
.method public static progressChanged(Lcom/amazonaws/event/ProgressListener;Lcom/amazonaws/event/ProgressEvent;)Ljava/util/concurrent/Future;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/amazonaws/event/ProgressListener;",
"Lcom/amazonaws/event/ProgressEvent;",
")",
"Ljava/util/concurrent/Future<",
"*>;"
}
.end annotation
if-nez p0, :cond_0
const/4 p0, 0x0
return-object p0
.line 1
:cond_0
sget-object v0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->executor:Ljava/util/concurrent/ExecutorService;
new-instance v1, Lcom/amazonaws/event/ProgressListenerCallbackExecutor$1;
invoke-direct {v1, p0, p1}, Lcom/amazonaws/event/ProgressListenerCallbackExecutor$1;-><init>(Lcom/amazonaws/event/ProgressListener;Lcom/amazonaws/event/ProgressEvent;)V
invoke-interface {v0, v1}, Ljava/util/concurrent/ExecutorService;->submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
move-result-object p0
return-object p0
.end method
.method public static wrapListener(Lcom/amazonaws/event/ProgressListener;)Lcom/amazonaws/event/ProgressListenerCallbackExecutor;
.locals 1
if-nez p0, :cond_0
const/4 p0, 0x0
goto :goto_0
.line 1
:cond_0
new-instance v0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor;
invoke-direct {v0, p0}, Lcom/amazonaws/event/ProgressListenerCallbackExecutor;-><init>(Lcom/amazonaws/event/ProgressListener;)V
move-object p0, v0
:goto_0
return-object p0
.end method
# virtual methods
.method public getListener()Lcom/amazonaws/event/ProgressListener;
.locals 1
.line 1
iget-object v0, p0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->listener:Lcom/amazonaws/event/ProgressListener;
return-object v0
.end method
.method public progressChanged(Lcom/amazonaws/event/ProgressEvent;)V
.locals 2
.line 2
iget-object v0, p0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->listener:Lcom/amazonaws/event/ProgressListener;
if-nez v0, :cond_0
return-void
.line 3
:cond_0
sget-object v0, Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->executor:Ljava/util/concurrent/ExecutorService;
new-instance v1, Lcom/amazonaws/event/ProgressListenerCallbackExecutor$2;
invoke-direct {v1, p0, p1}, Lcom/amazonaws/event/ProgressListenerCallbackExecutor$2;-><init>(Lcom/amazonaws/event/ProgressListenerCallbackExecutor;Lcom/amazonaws/event/ProgressEvent;)V
invoke-interface {v0, v1}, Ljava/util/concurrent/ExecutorService;->submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
return-void
.end method
@@ -0,0 +1,19 @@
.class public interface abstract Lcom/amazonaws/event/ProgressListenerChain$ProgressEventFilter;
.super Ljava/lang/Object;
.source "ProgressListenerChain.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/amazonaws/event/ProgressListenerChain;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x609
name = "ProgressEventFilter"
.end annotation
# virtual methods
.method public abstract filter(Lcom/amazonaws/event/ProgressEvent;)Lcom/amazonaws/event/ProgressEvent;
.end method
@@ -0,0 +1,258 @@
.class public Lcom/amazonaws/event/ProgressListenerChain;
.super Ljava/lang/Object;
.source "ProgressListenerChain.java"
# interfaces
.implements Lcom/amazonaws/event/ProgressListener;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/amazonaws/event/ProgressListenerChain$ProgressEventFilter;
}
.end annotation
# static fields
.field private static final log:Lcom/amazonaws/logging/Log;
# instance fields
.field private final listeners:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lcom/amazonaws/event/ProgressListener;",
">;"
}
.end annotation
.end field
.field private final progressEventFilter:Lcom/amazonaws/event/ProgressListenerChain$ProgressEventFilter;
# direct methods
.method public static constructor <clinit>()V
.locals 1
.line 1
const-class v0, Lcom/amazonaws/event/ProgressListenerChain;
invoke-static {v0}, Lcom/amazonaws/logging/LogFactory;->getLog(Ljava/lang/Class;)Lcom/amazonaws/logging/Log;
move-result-object v0
sput-object v0, Lcom/amazonaws/event/ProgressListenerChain;->log:Lcom/amazonaws/logging/Log;
return-void
.end method
.method public varargs constructor <init>(Lcom/amazonaws/event/ProgressListenerChain$ProgressEventFilter;[Lcom/amazonaws/event/ProgressListener;)V
.locals 3
.line 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 3
new-instance v0, Ljava/util/concurrent/CopyOnWriteArrayList;
invoke-direct {v0}, Ljava/util/concurrent/CopyOnWriteArrayList;-><init>()V
iput-object v0, p0, Lcom/amazonaws/event/ProgressListenerChain;->listeners:Ljava/util/List;
if-eqz p2, :cond_1
.line 4
array-length v0, p2
const/4 v1, 0x0
:goto_0
if-ge v1, v0, :cond_0
aget-object v2, p2, v1
.line 5
invoke-virtual {p0, v2}, Lcom/amazonaws/event/ProgressListenerChain;->addProgressListener(Lcom/amazonaws/event/ProgressListener;)V
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 6
:cond_0
iput-object p1, p0, Lcom/amazonaws/event/ProgressListenerChain;->progressEventFilter:Lcom/amazonaws/event/ProgressListenerChain$ProgressEventFilter;
return-void
.line 7
:cond_1
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "Progress Listeners cannot be null."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public varargs constructor <init>([Lcom/amazonaws/event/ProgressListener;)V
.locals 1
const/4 v0, 0x0
.line 1
invoke-direct {p0, v0, p1}, Lcom/amazonaws/event/ProgressListenerChain;-><init>(Lcom/amazonaws/event/ProgressListenerChain$ProgressEventFilter;[Lcom/amazonaws/event/ProgressListener;)V
return-void
.end method
# virtual methods
.method public declared-synchronized addProgressListener(Lcom/amazonaws/event/ProgressListener;)V
.locals 1
monitor-enter p0
if-nez p1, :cond_0
.line 1
monitor-exit p0
return-void
.line 2
:cond_0
:try_start_0
iget-object v0, p0, Lcom/amazonaws/event/ProgressListenerChain;->listeners:Ljava/util/List;
invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public getListeners()Ljava/util/List;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Lcom/amazonaws/event/ProgressListener;",
">;"
}
.end annotation
.line 1
iget-object v0, p0, Lcom/amazonaws/event/ProgressListenerChain;->listeners:Ljava/util/List;
return-object v0
.end method
.method public progressChanged(Lcom/amazonaws/event/ProgressEvent;)V
.locals 4
.line 1
iget-object v0, p0, Lcom/amazonaws/event/ProgressListenerChain;->progressEventFilter:Lcom/amazonaws/event/ProgressListenerChain$ProgressEventFilter;
if-eqz v0, :cond_0
.line 2
invoke-interface {v0, p1}, Lcom/amazonaws/event/ProgressListenerChain$ProgressEventFilter;->filter(Lcom/amazonaws/event/ProgressEvent;)Lcom/amazonaws/event/ProgressEvent;
move-result-object p1
if-nez p1, :cond_0
return-void
.line 3
:cond_0
iget-object v0, p0, Lcom/amazonaws/event/ProgressListenerChain;->listeners:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/amazonaws/event/ProgressListener;
.line 4
:try_start_0
invoke-interface {v1, p1}, Lcom/amazonaws/event/ProgressListener;->progressChanged(Lcom/amazonaws/event/ProgressEvent;)V
:try_end_0
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception v1
.line 5
sget-object v2, Lcom/amazonaws/event/ProgressListenerChain;->log:Lcom/amazonaws/logging/Log;
const-string v3, "Couldn\'t update progress listener"
invoke-interface {v2, v3, v1}, Lcom/amazonaws/logging/Log;->warn(Ljava/lang/Object;Ljava/lang/Throwable;)V
goto :goto_0
:cond_1
return-void
.end method
.method public declared-synchronized removeProgressListener(Lcom/amazonaws/event/ProgressListener;)V
.locals 1
monitor-enter p0
if-nez p1, :cond_0
.line 1
monitor-exit p0
return-void
.line 2
:cond_0
:try_start_0
iget-object v0, p0, Lcom/amazonaws/event/ProgressListenerChain;->listeners:Ljava/util/List;
invoke-interface {v0, p1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
@@ -0,0 +1,278 @@
.class public Lcom/amazonaws/event/ProgressReportingInputStream;
.super Lcom/amazonaws/internal/SdkFilterInputStream;
.source "ProgressReportingInputStream.java"
# static fields
.field private static final BYTES_IN_KB:I = 0x400
.field private static final THRESHOLD_IN_KB:I = 0x8
# instance fields
.field private fireCompletedEvent:Z
.field private final listenerCallbackExecutor:Lcom/amazonaws/event/ProgressListenerCallbackExecutor;
.field private notificationThreshold:I
.field private unnotifiedByteCount:I
# direct methods
.method public constructor <init>(Ljava/io/InputStream;Lcom/amazonaws/event/ProgressListenerCallbackExecutor;)V
.locals 0
.line 1
invoke-direct {p0, p1}, Lcom/amazonaws/internal/SdkFilterInputStream;-><init>(Ljava/io/InputStream;)V
const/16 p1, 0x2000
.line 2
iput p1, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->notificationThreshold:I
.line 3
iput-object p2, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->listenerCallbackExecutor:Lcom/amazonaws/event/ProgressListenerCallbackExecutor;
return-void
.end method
.method private notify(I)V
.locals 4
.line 1
iget v0, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->unnotifiedByteCount:I
add-int/2addr v0, p1
iput v0, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->unnotifiedByteCount:I
.line 2
iget p1, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->notificationThreshold:I
if-lt v0, p1, :cond_0
.line 3
iget-object p1, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->listenerCallbackExecutor:Lcom/amazonaws/event/ProgressListenerCallbackExecutor;
new-instance v1, Lcom/amazonaws/event/ProgressEvent;
int-to-long v2, v0
invoke-direct {v1, v2, v3}, Lcom/amazonaws/event/ProgressEvent;-><init>(J)V
invoke-virtual {p1, v1}, Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->progressChanged(Lcom/amazonaws/event/ProgressEvent;)V
const/4 p1, 0x0
.line 4
iput p1, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->unnotifiedByteCount:I
:cond_0
return-void
.end method
.method private notifyCompleted()V
.locals 3
.line 1
iget-boolean v0, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->fireCompletedEvent:Z
if-nez v0, :cond_0
return-void
.line 2
:cond_0
new-instance v0, Lcom/amazonaws/event/ProgressEvent;
iget v1, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->unnotifiedByteCount:I
int-to-long v1, v1
invoke-direct {v0, v1, v2}, Lcom/amazonaws/event/ProgressEvent;-><init>(J)V
const/4 v1, 0x4
.line 3
invoke-virtual {v0, v1}, Lcom/amazonaws/event/ProgressEvent;->setEventCode(I)V
const/4 v1, 0x0
.line 4
iput v1, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->unnotifiedByteCount:I
.line 5
iget-object v1, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->listenerCallbackExecutor:Lcom/amazonaws/event/ProgressListenerCallbackExecutor;
invoke-virtual {v1, v0}, Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->progressChanged(Lcom/amazonaws/event/ProgressEvent;)V
return-void
.end method
# virtual methods
.method public close()V
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget v0, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->unnotifiedByteCount:I
if-lez v0, :cond_0
.line 2
iget-object v1, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->listenerCallbackExecutor:Lcom/amazonaws/event/ProgressListenerCallbackExecutor;
new-instance v2, Lcom/amazonaws/event/ProgressEvent;
int-to-long v3, v0
invoke-direct {v2, v3, v4}, Lcom/amazonaws/event/ProgressEvent;-><init>(J)V
invoke-virtual {v1, v2}, Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->progressChanged(Lcom/amazonaws/event/ProgressEvent;)V
const/4 v0, 0x0
.line 3
iput v0, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->unnotifiedByteCount:I
.line 4
:cond_0
invoke-super {p0}, Lcom/amazonaws/internal/SdkFilterInputStream;->close()V
return-void
.end method
.method public getFireCompletedEvent()Z
.locals 1
.line 1
iget-boolean v0, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->fireCompletedEvent:Z
return v0
.end method
.method public read()I
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-super {p0}, Lcom/amazonaws/internal/SdkFilterInputStream;->read()I
move-result v0
const/4 v1, -0x1
if-ne v0, v1, :cond_0
.line 2
invoke-direct {p0}, Lcom/amazonaws/event/ProgressReportingInputStream;->notifyCompleted()V
goto :goto_0
:cond_0
const/4 v1, 0x1
.line 3
invoke-direct {p0, v1}, Lcom/amazonaws/event/ProgressReportingInputStream;->notify(I)V
:goto_0
return v0
.end method
.method public read([BII)I
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 4
invoke-super {p0, p1, p2, p3}, Lcom/amazonaws/internal/SdkFilterInputStream;->read([BII)I
move-result p1
const/4 p2, -0x1
if-ne p1, p2, :cond_0
.line 5
invoke-direct {p0}, Lcom/amazonaws/event/ProgressReportingInputStream;->notifyCompleted()V
:cond_0
if-eq p1, p2, :cond_1
.line 6
invoke-direct {p0, p1}, Lcom/amazonaws/event/ProgressReportingInputStream;->notify(I)V
:cond_1
return p1
.end method
.method public reset()V
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-super {p0}, Lcom/amazonaws/internal/SdkFilterInputStream;->reset()V
.line 2
new-instance v0, Lcom/amazonaws/event/ProgressEvent;
iget v1, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->unnotifiedByteCount:I
int-to-long v1, v1
invoke-direct {v0, v1, v2}, Lcom/amazonaws/event/ProgressEvent;-><init>(J)V
const/16 v1, 0x20
.line 3
invoke-virtual {v0, v1}, Lcom/amazonaws/event/ProgressEvent;->setEventCode(I)V
.line 4
iget-object v1, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->listenerCallbackExecutor:Lcom/amazonaws/event/ProgressListenerCallbackExecutor;
invoke-virtual {v1, v0}, Lcom/amazonaws/event/ProgressListenerCallbackExecutor;->progressChanged(Lcom/amazonaws/event/ProgressEvent;)V
const/4 v0, 0x0
.line 5
iput v0, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->unnotifiedByteCount:I
return-void
.end method
.method public setFireCompletedEvent(Z)V
.locals 0
.line 1
iput-boolean p1, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->fireCompletedEvent:Z
return-void
.end method
.method public setNotificationThreshold(I)V
.locals 0
mul-int/lit16 p1, p1, 0x400
.line 1
iput p1, p0, Lcom/amazonaws/event/ProgressReportingInputStream;->notificationThreshold:I
return-void
.end method