You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
60 lines
1.2 KiB
Java
60 lines
1.2 KiB
Java
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 read(b, 0, b.length);
|
|
}
|
|
|
|
@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);
|
|
}
|
|
}
|