Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit 934ea82

Browse files
committed
Merge branch 'bugfix/fileinforesponse-size-type' into bugfix/remove-primitive-types
2 parents b85150d + 571ac53 commit 934ea82

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/synapticloop/b2/response/B2DownloadFileResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class B2DownloadFileResponse {
5858
}
5959

6060
private final InputStream stream;
61-
private final Integer contentLength;
61+
private final Long contentLength;
6262
private final String contentType;
6363
private final String fileId;
6464
private final String fileName;
@@ -84,7 +84,7 @@ public B2DownloadFileResponse(CloseableHttpResponse response) throws B2ApiExcept
8484
EntityUtils.consume(response.getEntity());
8585
}
8686

87-
contentLength = Integer.parseInt(response.getFirstHeader(HttpHeaders.CONTENT_LENGTH).getValue());
87+
contentLength = Long.parseLong(response.getFirstHeader(HttpHeaders.CONTENT_LENGTH).getValue());
8888
contentType = response.getFirstHeader(HttpHeaders.CONTENT_TYPE).getValue();
8989
contentSha1 = response.getFirstHeader(B2ResponseHeaders.HEADER_X_BZ_CONTENT_SHA1).getValue();
9090
fileId = response.getFirstHeader(B2ResponseHeaders.HEADER_X_BZ_FILE_ID).getValue();
@@ -119,7 +119,7 @@ public B2DownloadFileResponse(CloseableHttpResponse response) throws B2ApiExcept
119119
*
120120
* @return the length of the content
121121
*/
122-
public Integer getContentLength() { return this.contentLength; }
122+
public Long getContentLength() { return this.contentLength; }
123123

124124
/**
125125
* Get the content type of the downloaded file

0 commit comments

Comments
 (0)