Skip to content

Commit 46d2ba9

Browse files
Merge branch 'master' into release
2 parents b5fa35e + 2f663c5 commit 46d2ba9

File tree

657 files changed

+62024
-3650
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

657 files changed

+62024
-3650
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ This repository contains Aspose.Words Cloud SDK for Java source code. This SDK a
1313
* Watermarks and protection
1414
* Full read & write access to Document Object Model, including sections, paragraphs, text, images, tables, headers/footers and many others
1515

16+
## Enhancements in Version 21.1
17+
18+
- Added online version for all API methods
19+
20+
1621
## Enhancements in Version 20.11
1722

1823
- In configuration json file appSid / appKey has been replaced to clientId / clientSecret.
@@ -112,7 +117,7 @@ Add this dependency to your project's POM:
112117
<dependency>
113118
<groupId>com.aspose</groupId>
114119
<artifactId>aspose-words-cloud</artifactId>
115-
<version>20.11.0</version>
120+
<version>21.1.0</version>
116121
</dependency>
117122
</dependencies>
118123
```

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<artifactId>aspose-words-cloud</artifactId>
55
<packaging>jar</packaging>
66
<name>AsposeWordsCloud</name>
7-
<version>20.11.0</version>
7+
<version>21.1.0</version>
88
<url>https://www.aspose.cloud/</url>
99
<description>Aspose Words Java SDK</description>
1010
<scm>

src/main/java/com/aspose/words/cloud/ApiCallback.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* --------------------------------------------------------------------------------
33
* <copyright company="Aspose" file="ApiCallback.java">
4-
* Copyright (c) 2020 Aspose.Words for Cloud
4+
* Copyright (c) 2021 Aspose.Words for Cloud
55
* </copyright>
66
* <summary>
77
* Permission is hereby granted, free of charge, to any person obtaining a copy

src/main/java/com/aspose/words/cloud/ApiClient.java

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* --------------------------------------------------------------------------------
33
* <copyright company="Aspose" file="ApiClient.java">
4-
* Copyright (c) 2020 Aspose.Words for Cloud
4+
* Copyright (c) 2021 Aspose.Words for Cloud
55
* </copyright>
66
* <summary>
77
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -56,7 +56,7 @@ public class ApiClient {
5656
private String apiVersion = "v4.0";
5757
private String baseUrl = "https://api.aspose.cloud";
5858
private String basePath = baseUrl + "/" + apiVersion;
59-
private String clientVersion = "20.11";
59+
private String clientVersion = "21.1";
6060
private boolean debugging = false;
6161
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
6262
private String tempFolderPath = null;
@@ -922,7 +922,7 @@ public Call buildCall(Request request) {
922922
* @param body The request body object
923923
* @param headerParams The header parameters
924924
* @param formParams The form parameters
925-
* @param authNames The authentications to apply
925+
* @param addAuthHeaders The authentications to apply
926926
* @param progressRequestListener Progress request listener
927927
* @return The HTTP request
928928
* @throws ApiException If fail to serialize the request body object
@@ -1185,6 +1185,61 @@ public Request buildBatchRequest(RequestIfc[] requests) throws ApiException, IOE
11851185
return buildRequest("/words/batch", "PUT", new ArrayList<>(), new ArrayList<>(), requestBody, headers, new HashMap<>(), true, null);
11861186
}
11871187

1188+
/**
1189+
* Parse model from online response.
1190+
*/
1191+
public Object parseModel(BodyPart bodyPart, Type returnType) throws IOException, MessagingException {
1192+
InputStream is = bodyPart.getInputStream();
1193+
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
1194+
1195+
int nRead;
1196+
byte[] data = new byte[16384];
1197+
1198+
while ((nRead = is.read(data, 0, data.length)) != -1) {
1199+
buffer.write(data, 0, nRead);
1200+
}
1201+
1202+
try {
1203+
String stringData = buffer.toString("UTF-8");
1204+
return json.deserialize(stringData, returnType);
1205+
}
1206+
catch (UnsupportedEncodingException e) {
1207+
e.printStackTrace();
1208+
}
1209+
return null;
1210+
}
1211+
1212+
/**
1213+
* Parse document from online response.
1214+
*/
1215+
public byte[] parseDocument(BodyPart bodyPart) throws IOException, MessagingException {
1216+
InputStream is = bodyPart.getInputStream();
1217+
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
1218+
1219+
int nRead;
1220+
byte[] data = new byte[16384];
1221+
1222+
while ((nRead = is.read(data, 0, data.length)) != -1) {
1223+
buffer.write(data, 0, nRead);
1224+
}
1225+
1226+
return buffer.toByteArray();
1227+
}
1228+
1229+
/**
1230+
* Get multipart from response.
1231+
*/
1232+
public MimeMultipart getMultipartFromResponse(Response response) throws ApiException {
1233+
try {
1234+
InputStream in = response.body().byteStream();
1235+
ByteArrayDataSource dataSource = new ByteArrayDataSource(in, "multipart/form-data");
1236+
return new MimeMultipart(dataSource);
1237+
}
1238+
catch (IOException | MessagingException e) {
1239+
throw new ApiException(e);
1240+
}
1241+
}
1242+
11881243
/**
11891244
* Parse batch part
11901245
*/

src/main/java/com/aspose/words/cloud/ApiException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* --------------------------------------------------------------------------------
33
* <copyright company="Aspose" file="ApiException.java">
4-
* Copyright (c) 2020 Aspose.Words for Cloud
4+
* Copyright (c) 2021 Aspose.Words for Cloud
55
* </copyright>
66
* <summary>
77
* Permission is hereby granted, free of charge, to any person obtaining a copy

src/main/java/com/aspose/words/cloud/ApiLoggingInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* --------------------------------------------------------------------------------
33
* <copyright company="Aspose" file="ApiLoggingInterceptor.java">
4-
* Copyright (c) 2020 Aspose.Words for Cloud
4+
* Copyright (c) 2021 Aspose.Words for Cloud
55
* </copyright>
66
* <summary>
77
* Permission is hereby granted, free of charge, to any person obtaining a copy

src/main/java/com/aspose/words/cloud/ApiResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* --------------------------------------------------------------------------------
33
* <copyright company="Aspose" file="ApiResponse.java">
4-
* Copyright (c) 2020 Aspose.Words for Cloud
4+
* Copyright (c) 2021 Aspose.Words for Cloud
55
* </copyright>
66
* <summary>
77
* Permission is hereby granted, free of charge, to any person obtaining a copy

src/main/java/com/aspose/words/cloud/ChildRequestContent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* --------------------------------------------------------------------------------
33
* <copyright company="Aspose" file="ChildRequestContent.java">
4-
* Copyright (c) 2020 Aspose.Words for Cloud
4+
* Copyright (c) 2021 Aspose.Words for Cloud
55
* </copyright>
66
* <summary>
77
* Permission is hereby granted, free of charge, to any person obtaining a copy

src/main/java/com/aspose/words/cloud/Configuration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* --------------------------------------------------------------------------------
33
* <copyright company="Aspose" file="Configuration.java">
4-
* Copyright (c) 2020 Aspose.Words for Cloud
4+
* Copyright (c) 2021 Aspose.Words for Cloud
55
* </copyright>
66
* <summary>
77
* Permission is hereby granted, free of charge, to any person obtaining a copy

src/main/java/com/aspose/words/cloud/GzipRequestInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* --------------------------------------------------------------------------------
33
* <copyright company="Aspose" file="GzipRequestInterceptor.java">
4-
* Copyright (c) 2020 Aspose.Words for Cloud
4+
* Copyright (c) 2021 Aspose.Words for Cloud
55
* </copyright>
66
* <summary>
77
* Permission is hereby granted, free of charge, to any person obtaining a copy

0 commit comments

Comments
 (0)