diff --git a/src/main/java/com/amadeus/travel/TripParser.java b/src/main/java/com/amadeus/travel/TripParser.java index 47819a66..445d12f5 100644 --- a/src/main/java/com/amadeus/travel/TripParser.java +++ b/src/main/java/com/amadeus/travel/TripParser.java @@ -6,11 +6,11 @@ import com.amadeus.resources.Resource; import com.amadeus.resources.TripDetail; import com.google.gson.JsonObject; -import com.sun.org.apache.xerces.internal.impl.dv.util.Base64; import java.io.File; import java.io.IOException; import java.nio.file.Files; +import javax.xml.bind.DatatypeConverter; /** *

@@ -89,7 +89,7 @@ public TripDetail post(String body) throws ResponseException { */ public TripDetail post(File file) throws ResponseException, IOException { // Base64 encode file and create request body - String b64Encoded = Base64.encode(Files.readAllBytes(file.toPath())); + String b64Encoded = DatatypeConverter.printBase64Binary(Files.readAllBytes(file.toPath())); JsonObject body = new JsonObject(); body.addProperty("payload", b64Encoded);