public static class BoxRequestsFile.UploadSessionPart extends BoxRequest<BoxUploadSessionPart,BoxRequestsFile.UploadSessionPart>
BoxRequest.BoxRequestHandler<R extends BoxRequest>, BoxRequest.ContentTypes, BoxRequest.Methods, BoxRequest.TLSSSLSocketFactoryJSON_OBJECT, mBodyMap, mContentType, mHeaderMap, mListener, mQueryMap, mRequestMethod, mRequestUrlString, mRequiresSocket, mSession, mTimeout| Constructor and Description |
|---|
UploadSessionPart(java.io.File file,
BoxUploadSession uploadSession,
int partNumber,
BoxSession session)
Creates an Object to upload one specific multiput part of a file
|
UploadSessionPart(java.io.InputStream is,
long fileSize,
BoxUploadSession uploadSession,
int partNumber,
BoxSession session)
Creates an Object to upload one specific multiput part of a file
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
createHeaderMap() |
protected java.io.InputStream |
getInputStream() |
long |
getPartSize()
Returns the multiput part size to be uploaded
|
BoxRequestsFile.UploadSessionPart |
setAlreadyPositioned(boolean alreadyPositioned)
Set to true only if the file or input stream used in the constructor starts at
the beginning of this part.
|
protected void |
setBody(com.box.androidsdk.content.requests.BoxHttpRequest request) |
BoxRequestsFile.UploadSessionPart |
setProgressListener(ProgressListener listener)
Sets the progress listener for the upload request.
|
buildUrl, createHttpRequest, createQuery, equals, getIfMatchEtag, getIfNoneMatchEtag, getRequestHandler, getSession, getSocket, getStringBody, handleSendForCachedResult, handleToTaskForCachedResult, handleUpdateCache, hashCode, importRequestContentMapsFrom, logDebug, logRequest, onSend, onSendCompleted, parseHashMapEntry, parseJsonObject, send, sendRequest, setContentType, setHeaders, setIfMatchEtag, setIfNoneMatchEtag, setRequestHandler, setTimeOut, toTaskpublic UploadSessionPart(java.io.File file,
BoxUploadSession uploadSession,
int partNumber,
BoxSession session)
throws java.io.IOException
file - Creates an upload file session part with the default parametersuploadSession - The uploadSession objectpartNumber - the part number from the filesession - The BoxSession objectjava.io.IOExceptionpublic UploadSessionPart(java.io.InputStream is,
long fileSize,
BoxUploadSession uploadSession,
int partNumber,
BoxSession session)
throws java.io.IOException
is - the InputStream from where this object will read the filefileSize - the InputStream length to be readuploadSession - the Upload session objectpartNumber - the part number from the file/InputStreamsession - The BoxSession objectjava.io.IOExceptionprotected java.io.InputStream getInputStream()
throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionprotected void createHeaderMap()
createHeaderMap in class BoxRequest<BoxUploadSessionPart,BoxRequestsFile.UploadSessionPart>protected void setBody(com.box.androidsdk.content.requests.BoxHttpRequest request)
throws java.io.IOException
setBody in class BoxRequest<BoxUploadSessionPart,BoxRequestsFile.UploadSessionPart>java.io.IOExceptionpublic BoxRequestsFile.UploadSessionPart setProgressListener(ProgressListener listener)
listener - progress listener for the request.public BoxRequestsFile.UploadSessionPart setAlreadyPositioned(boolean alreadyPositioned)
alreadyPositioned - true to reuse the input stream.public long getPartSize()