Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
80cabb33
Commit
80cabb33
authored
Dec 01, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Java has native inputstream wrapper
parent
2c69e2c1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
76 deletions
+2
-76
ProcessRepoZip.java
...main/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java
+2
-2
InputStreamWrapper.java
...va/com/topjohnwu/magisk/container/InputStreamWrapper.java
+0
-74
No files found.
app/src/main/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java
View file @
80cabb33
...
...
@@ -12,7 +12,6 @@ import android.widget.Toast;
import
com.topjohnwu.magisk.FlashActivity
;
import
com.topjohnwu.magisk.MagiskManager
;
import
com.topjohnwu.magisk.R
;
import
com.topjohnwu.magisk.container.InputStreamWrapper
;
import
com.topjohnwu.magisk.utils.Const
;
import
com.topjohnwu.magisk.utils.Shell
;
import
com.topjohnwu.magisk.utils.Utils
;
...
...
@@ -24,6 +23,7 @@ import java.io.BufferedOutputStream;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileOutputStream
;
import
java.io.FilterInputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
...
...
@@ -167,7 +167,7 @@ public class ProcessRepoZip extends ParallelTask<Void, Object, Boolean> {
return
this
;
}
private
class
ProgressInputStream
extends
InputStreamWrapper
{
private
class
ProgressInputStream
extends
FilterInputStream
{
ProgressInputStream
(
InputStream
in
)
{
super
(
in
);
...
...
app/src/main/java/com/topjohnwu/magisk/container/InputStreamWrapper.java
deleted
100644 → 0
View file @
2c69e2c1
package
com
.
topjohnwu
.
magisk
.
container
;
import
android.support.annotation.NonNull
;
import
java.io.IOException
;
import
java.io.InputStream
;
public
class
InputStreamWrapper
extends
InputStream
{
private
InputStream
in
;
public
InputStreamWrapper
(
InputStream
in
)
{
this
.
in
=
in
;
}
@Override
public
int
available
()
throws
IOException
{
return
in
.
available
();
}
@Override
public
void
close
()
throws
IOException
{
in
.
close
();
}
@Override
public
synchronized
void
mark
(
int
readlimit
)
{
in
.
mark
(
readlimit
);
}
@Override
public
boolean
markSupported
()
{
return
in
.
markSupported
();
}
@Override
public
synchronized
int
read
()
throws
IOException
{
return
in
.
read
();
}
@Override
public
int
read
(
@NonNull
byte
[]
b
)
throws
IOException
{
return
in
.
read
(
b
);
}
@Override
public
synchronized
int
read
(
@NonNull
byte
[]
b
,
int
off
,
int
len
)
throws
IOException
{
return
in
.
read
(
b
,
off
,
len
);
}
@Override
public
synchronized
void
reset
()
throws
IOException
{
in
.
reset
();
}
@Override
public
long
skip
(
long
n
)
throws
IOException
{
return
in
.
skip
(
n
);
}
@Override
public
int
hashCode
()
{
return
in
.
hashCode
();
}
@Override
public
boolean
equals
(
Object
obj
)
{
return
in
.
equals
(
obj
);
}
@Override
public
String
toString
()
{
return
in
.
toString
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment