mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-27 06:10:28 +01:00
Remove unnecessary exception declarations
This commit is contained in:
parent
eed9d1a76a
commit
ddf5209109
|
@ -52,7 +52,7 @@ public class ChessEngine {
|
||||||
}
|
}
|
||||||
|
|
||||||
public File copyToFiles(ContentResolver contentResolver, File destination)
|
public File copyToFiles(ContentResolver contentResolver, File destination)
|
||||||
throws FileNotFoundException, IOException {
|
throws IOException {
|
||||||
Uri uri = getUri();
|
Uri uri = getUri();
|
||||||
File output = new File(destination, uri.getPath().toString());
|
File output = new File(destination, uri.getPath().toString());
|
||||||
copyUri(contentResolver, uri, output.getAbsolutePath());
|
copyUri(contentResolver, uri, output.getAbsolutePath());
|
||||||
|
@ -60,15 +60,13 @@ public class ChessEngine {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void copyUri(final ContentResolver contentResolver,
|
public void copyUri(final ContentResolver contentResolver,
|
||||||
final Uri source, String targetFilePath) throws IOException,
|
final Uri source, String targetFilePath) throws IOException {
|
||||||
FileNotFoundException {
|
|
||||||
InputStream istream = contentResolver.openInputStream(source);
|
InputStream istream = contentResolver.openInputStream(source);
|
||||||
copyFile(istream, targetFilePath);
|
copyFile(istream, targetFilePath);
|
||||||
setExecutablePermission(targetFilePath);
|
setExecutablePermission(targetFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void copyFile(InputStream istream, String targetFilePath)
|
private void copyFile(InputStream istream, String targetFilePath) throws IOException {
|
||||||
throws FileNotFoundException, IOException {
|
|
||||||
FileOutputStream fout = new FileOutputStream(targetFilePath);
|
FileOutputStream fout = new FileOutputStream(targetFilePath);
|
||||||
byte[] b = new byte[1024];
|
byte[] b = new byte[1024];
|
||||||
int numBytes = 0;
|
int numBytes = 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user