• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

box / box-java-sdk / #5076

07 Oct 2025 12:35PM UTC coverage: 37.132% (+0.007%) from 37.125%
#5076

push

github

web-flow
test: Change `Event.additionalDetails` field assertion in events test (box/box-codegen#858) (#1491)

18454 of 49699 relevant lines covered (37.13%)

0.37 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

38.1
/src/main/java/com/box/sdkgen/managers/chunkeduploads/UploadFilePartByUrlHeaders.java
1
package com.box.sdkgen.managers.chunkeduploads;
2

3
import static com.box.sdkgen.internal.utils.UtilsManager.mapOf;
4

5
import java.util.Map;
6

7
public class UploadFilePartByUrlHeaders {
8

9
  /**
10
   * The [RFC3230][1] message digest of the chunk uploaded.
11
   *
12
   * <p>Only SHA1 is supported. The SHA1 digest must be base64 encoded. The format of this header is
13
   * as `sha=BASE64_ENCODED_DIGEST`.
14
   *
15
   * <p>To get the value for the `SHA` digest, use the openSSL command to encode the file part:
16
   * `openssl sha1 -binary &lt;FILE_PART_NAME&gt; | base64`.
17
   *
18
   * <p>[1]: https://tools.ietf.org/html/rfc3230
19
   */
20
  public final String digest;
21

22
  /**
23
   * The byte range of the chunk.
24
   *
25
   * <p>Must not overlap with the range of a part already uploaded this session. Each part’s size
26
   * must be exactly equal in size to the part size specified in the upload session that you
27
   * created. One exception is the last part of the file, as this can be smaller.
28
   *
29
   * <p>When providing the value for `content-range`, remember that:
30
   *
31
   * <p>* The lower bound of each part's byte range must be a multiple of the part size. * The
32
   * higher bound must be a multiple of the part size - 1.
33
   */
34
  public final String contentRange;
35

36
  /** Extra headers that will be included in the HTTP request. */
37
  public Map<String, String> extraHeaders;
38

39
  public UploadFilePartByUrlHeaders(String digest, String contentRange) {
1✔
40
    this.digest = digest;
1✔
41
    this.contentRange = contentRange;
1✔
42
    this.extraHeaders = mapOf();
1✔
43
  }
1✔
44

45
  protected UploadFilePartByUrlHeaders(Builder builder) {
×
46
    this.digest = builder.digest;
×
47
    this.contentRange = builder.contentRange;
×
48
    this.extraHeaders = builder.extraHeaders;
×
49
  }
×
50

51
  public String getDigest() {
52
    return digest;
1✔
53
  }
54

55
  public String getContentRange() {
56
    return contentRange;
1✔
57
  }
58

59
  public Map<String, String> getExtraHeaders() {
60
    return extraHeaders;
1✔
61
  }
62

63
  public static class Builder {
64

65
    protected final String digest;
66

67
    protected final String contentRange;
68

69
    protected Map<String, String> extraHeaders;
70

71
    public Builder(String digest, String contentRange) {
×
72
      this.digest = digest;
×
73
      this.contentRange = contentRange;
×
74
      this.extraHeaders = mapOf();
×
75
    }
×
76

77
    public Builder extraHeaders(Map<String, String> extraHeaders) {
78
      this.extraHeaders = extraHeaders;
×
79
      return this;
×
80
    }
81

82
    public UploadFilePartByUrlHeaders build() {
83
      return new UploadFilePartByUrlHeaders(this);
×
84
    }
85
  }
86
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc