public static class BoxRequestsFile.CreateNewVersionUploadSession extends BoxRequest<BoxUploadSession,BoxRequestsFile.CreateNewVersionUploadSession>
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 |
|---|
CreateNewVersionUploadSession(java.io.File file,
java.lang.String requestUrl,
BoxSession session)
Creates an upload session to upload a new version of the file.
|
CreateNewVersionUploadSession(java.io.InputStream is,
java.lang.String fileName,
long fileSize,
java.lang.String requestUrl,
BoxSession session) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getFileName()
Returns the name of the file to upload.
|
long |
getFileSize()
Returns the size of the file to upload
|
protected void |
onSendCompleted(BoxResponse<BoxUploadSession> response)
Post action that will be performed after a successful send occurs.
|
void |
setFileName(java.lang.String mFileName)
Set file name of the file to upload
|
buildUrl, createHeaderMap, createHttpRequest, createQuery, equals, getIfMatchEtag, getIfNoneMatchEtag, getRequestHandler, getSession, getSocket, getStringBody, handleSendForCachedResult, handleToTaskForCachedResult, handleUpdateCache, hashCode, importRequestContentMapsFrom, logDebug, logRequest, onSend, parseHashMapEntry, parseJsonObject, send, sendRequest, setBody, setContentType, setHeaders, setIfMatchEtag, setIfNoneMatchEtag, setRequestHandler, setTimeOut, toTaskpublic CreateNewVersionUploadSession(java.io.File file,
java.lang.String requestUrl,
BoxSession session)
throws java.io.FileNotFoundException
file - file to uploadrequestUrl - URL of the upload file endpointsession - the authenticated session that will be used to make the request withjava.io.FileNotFoundExceptionpublic CreateNewVersionUploadSession(java.io.InputStream is,
java.lang.String fileName,
long fileSize,
java.lang.String requestUrl,
BoxSession session)
throws java.io.FileNotFoundException
is - the input stream to be used to read the file datafileName - the file namefileSize - the file sizerequestUrl - URL of the upload file endpointsession - the authenticated session that will be used to make the request withjava.io.FileNotFoundExceptionprotected void onSendCompleted(BoxResponse<BoxUploadSession> response) throws BoxException
BoxRequestonSendCompleted in class BoxRequest<BoxUploadSession,BoxRequestsFile.CreateNewVersionUploadSession>response - response of the BoxRequestBoxException - thrown if there was a problem with handling the request.public void setFileName(java.lang.String mFileName)
mFileName - public java.lang.String getFileName()
public long getFileSize()