Class UploadSliceRequestBuilder<T extends com.microsoft.kiota.serialization.Parsable>
java.lang.Object
com.microsoft.graph.core.requests.upload.UploadSliceRequestBuilder<T>
- Type Parameters:
T- The type of the object being uploaded.
public class UploadSliceRequestBuilder<T extends com.microsoft.kiota.serialization.Parsable>
extends Object
Request for uploading a slice of a large file.
-
Constructor Summary
ConstructorsConstructorDescriptionUploadSliceRequestBuilder(String sessionUrl, com.microsoft.kiota.RequestAdapter requestAdapter, long rangeBegin, long rangeEnd, long totalSessionLength, com.microsoft.kiota.serialization.ParsableFactory<T> factory) Request for uploading one slice of a session. -
Method Summary
Modifier and TypeMethodDescriptionlongGet the starting byte position for this upload slice.longGet the ending byte position for this upload slice.longGet the range of bytes for this slice.longGet the total number of bytes being uploaded in the session.put(InputStream stream) Uploads the slice using PUT.
-
Constructor Details
-
UploadSliceRequestBuilder
public UploadSliceRequestBuilder(@Nonnull String sessionUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter, long rangeBegin, long rangeEnd, long totalSessionLength, @Nonnull com.microsoft.kiota.serialization.ParsableFactory<T> factory) Request for uploading one slice of a session.- Parameters:
sessionUrl- URL to upload the slice.requestAdapter- Request adapted used for uploading the slice.rangeBegin- Beginning of the range for this slice.rangeEnd- End of the range for this slice.totalSessionLength- Total session length. This MUST be consistent.factory- The ParsableFactory defining the instantiation of the object being uploaded.
-
-
Method Details
-
put
Uploads the slice using PUT.- Parameters:
stream- The stream of data to be uploaded.- Returns:
- The model containing the Upload information retrieved from the response.
-
getRangeLength
public long getRangeLength()Get the range of bytes for this slice.- Returns:
- the range of bytes in this slice.
-
getRangeBegin
public long getRangeBegin()Get the starting byte position for this upload slice.- Returns:
- The byte position where this upload slice begins.
-
getRangeEnd
public long getRangeEnd()Get the ending byte position for this upload slice.- Returns:
- the position where this upload slice ends.
-
getTotalSessionLength
public long getTotalSessionLength()Get the total number of bytes being uploaded in the session.- Returns:
- The total number of bytes in this upload session.
-