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 2323
2424import org .openqa .selenium .remote .Response ;
2525
26- import javax .xml .bind .DatatypeConverter ;
26+ import java .nio .charset .StandardCharsets ;
27+ import java .util .Base64 ;
2728
2829public interface InteractsWithFiles extends ExecutesMethod {
2930
@@ -50,7 +51,7 @@ default byte[] pullFile(String remotePath) {
5051 Response response = execute (PULL_FILE , ImmutableMap .of ("path" , remotePath ));
5152 String base64String = response .getValue ().toString ();
5253
53- return DatatypeConverter . parseBase64Binary ( base64String );
54+ return Base64 . getDecoder (). decode ( base64String . getBytes ( StandardCharsets . UTF_8 ) );
5455 }
5556
5657 /**
@@ -76,7 +77,7 @@ default byte[] pullFolder(String remotePath) {
7677 Response response = execute (PULL_FOLDER , ImmutableMap .of ("path" , remotePath ));
7778 String base64String = response .getValue ().toString ();
7879
79- return DatatypeConverter . parseBase64Binary ( base64String );
80+ return Base64 . getDecoder (). decode ( base64String . getBytes ( StandardCharsets . UTF_8 ) );
8081 }
8182
8283}
You can’t perform that action at this time.
0 commit comments