CrackMe.apk
Download file
package org.apache.commons.io;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.StringReader;
import java.io.Writer;
import java.nio.charset.Charset;
@Deprecated
public class CopyUtils {
private static final int DEFAULT_BUFFER_SIZE = 4096;
public static void copy(byte[] bArr, OutputStream outputStream) throws IOException {
outputStream.write(bArr);
}
@Deprecated
public static void copy(byte[] bArr, Writer writer) throws IOException {
copy((InputStream) new ByteArrayInputStream(bArr), writer);
}
public static void copy(byte[] bArr, Writer writer, String str) throws IOException {
copy((InputStream) new ByteArrayInputStream(bArr), writer, str);
}
public static int copy(InputStream inputStream, OutputStream outputStream) throws IOException {
byte[] bArr = new byte[4096];
int i = 0;
while (true) {
int read = inputStream.read(bArr);
if (-1 == read) {
return i;
}
outputStream.write(bArr, 0, read);
i += read;
}
}
public static int copy(Reader reader, Writer writer) throws IOException {
char[] cArr = new char[4096];
int i = 0;
while (true) {
int read = reader.read(cArr);
if (-1 == read) {
return i;
}
writer.write(cArr, 0, read);
i += read;
}
}
@Deprecated
public static void copy(InputStream inputStream, Writer writer) throws IOException {
copy((Reader) new InputStreamReader(inputStream, Charset.defaultCharset()), writer);
}
public static void copy(InputStream inputStream, Writer writer, String str) throws IOException {
copy((Reader) new InputStreamReader(inputStream, str), writer);
}
@Deprecated
public static void copy(Reader reader, OutputStream outputStream) throws IOException {
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream, Charset.defaultCharset());
copy(reader, (Writer) outputStreamWriter);
outputStreamWriter.flush();
}
public static void copy(Reader reader, OutputStream outputStream, String str) throws IOException {
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream, str);
copy(reader, (Writer) outputStreamWriter);
outputStreamWriter.flush();
}
@Deprecated
public static void copy(String str, OutputStream outputStream) throws IOException {
StringReader stringReader = new StringReader(str);
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream, Charset.defaultCharset());
copy((Reader) stringReader, (Writer) outputStreamWriter);
outputStreamWriter.flush();
}
public static void copy(String str, OutputStream outputStream, String str2) throws IOException {
StringReader stringReader = new StringReader(str);
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream, str2);
copy((Reader) stringReader, (Writer) outputStreamWriter);
outputStreamWriter.flush();
}
public static void copy(String str, Writer writer) throws IOException {
writer.write(str);
}
}
Download file