File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/main/java/io/appium/java_client Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 23
23
24
24
import org .openqa .selenium .remote .Response ;
25
25
26
- import javax .xml .bind .DatatypeConverter ;
26
+ import java .nio .charset .StandardCharsets ;
27
+ import java .util .Base64 ;
27
28
28
29
public interface InteractsWithFiles extends ExecutesMethod {
29
30
@@ -50,7 +51,7 @@ default byte[] pullFile(String remotePath) {
50
51
Response response = execute (PULL_FILE , ImmutableMap .of ("path" , remotePath ));
51
52
String base64String = response .getValue ().toString ();
52
53
53
- return DatatypeConverter . parseBase64Binary ( base64String );
54
+ return Base64 . getDecoder (). decode ( base64String . getBytes ( StandardCharsets . UTF_8 ) );
54
55
}
55
56
56
57
/**
@@ -76,7 +77,7 @@ default byte[] pullFolder(String remotePath) {
76
77
Response response = execute (PULL_FOLDER , ImmutableMap .of ("path" , remotePath ));
77
78
String base64String = response .getValue ().toString ();
78
79
79
- return DatatypeConverter . parseBase64Binary ( base64String );
80
+ return Base64 . getDecoder (). decode ( base64String . getBytes ( StandardCharsets . UTF_8 ) );
80
81
}
81
82
82
83
}
You can’t perform that action at this time.
0 commit comments