Skip to content

Commit 309340b

Browse files
author
Harish Gokavarapu
committed
v2.8.1
1 parent d11789e commit 309340b

File tree

3 files changed

+34
-24
lines changed

3 files changed

+34
-24
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sourceCompatibility = 1.6
99

1010
group = 'com.box'
1111
archivesBaseName = 'box-java-sdk'
12-
version = '2.8.0'
12+
version = '2.8.1'
1313

1414
repositories {
1515
mavenCentral()

doc/files.md

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ file's contents, upload new versions, and perform other common file operations
99
* [Update a File's Information](#update-a-files-information)
1010
* [Download a File](#download-a-file)
1111
* [Upload a File](#upload-a-file)
12-
* [Upload a large file in Chunks](#upload-a-large-file-in-chunks)
13-
* [Upload a large file in Chunks (using helper method)](#create-a-large-file)
12+
* [Upload a large file in Chunks (using helper method)](#Upload-a-new-large-File-in-Chunks-helper-method)
13+
* [Upload a large file Version or existing file (using helper method)](#Upload-a-large-File-version-of-existing-file-in-chunks-helper-method)
14+
* [Upload a large file in Chunks (using helper method)](#Upload-a-new-large-File-in-Chunks-without-helper-method)
15+
* [Upload a large file Version or existing file (using helper method)](#Upload-a-large-File-version-of-existing-file-in-chunks-without-helper-method)
1416
* [Copy a File](#copy-a-file)
1517
* [Delete a File](#delete-a-file)
1618
* [Get Previous Versions of a File](#get-previous-versions-of-a-file)
@@ -136,8 +138,34 @@ stream.close();
136138
[upload]: http://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/BoxFolder.html#uploadFile(java.io.InputStream,%20java.lang.String)
137139
[upload2]: http://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/BoxFolder.html#uploadFile(java.io.InputStream,%20java.lang.String,%20long,%20com.box.sdk.ProgressListener)
138140

139-
Upload a large File in chunks
140-
--------------------------------------
141+
Upload a new large File in Chunks (helper method)
142+
--------------------------------------------------
143+
144+
A large file can be uploaded with the [`uploadLargeFile(InputStream, fileName, fileSize)`][upload-large-file] method.
145+
146+
```java
147+
File myFile = new File("My Large_File.txt");
148+
FileInputStream stream = new FileInputStream(myFile);
149+
150+
BoxFolder rootFolder = BoxFolder.getRootFolder(api);
151+
BoxFile.Info fileInfo = rootFolder.uploadLargeFile(inputStream, "My_Large_File.txt", myFile.length());
152+
```
153+
154+
[upload-large-file]: http://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/BoxFolder.html#uploadLargeFile(java.io.InputStream,%20java.lang.String,%20long)
155+
156+
157+
Upload a large File version of existing file, in chunks (helper method)
158+
------------------------------------------------------------------------
159+
[upload-large-file-version]: http://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/BoxFile.html#uploadLargeFile-java.io.InputStream-long-
160+
161+
162+
Upload a new large File in Chunks (without helper method)
163+
--------------------------------------------------------------
164+
[create-upload-session]: http://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/BoxFolder.html#createUploadSession(java.lang.String,%20long)
165+
166+
167+
Upload a large File version of existing file, in chunks (without helper method)
168+
-------------------------------------------------------------------------------
141169

142170
An upload session can be created with the [`createUploadSession(fileName, fileSize)`][create-upload-session] method to
143171
upload a large file in chunks.
@@ -231,24 +259,6 @@ This call will update the parts processed and other information in the session i
231259
BoxFileUploadSession.Info updatedSessionInfo = session.getStatus();
232260
```
233261

234-
[create-upload-session]: http://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/BoxFolder.html#createUploadSession(java.lang.String,%20long)
235-
236-
Create a large File
237-
-------------------
238-
239-
A large file can be uploaded with the [`uploadLargeFile(InputStream, fileName, fileSize)`][upload-large-file] method.
240-
241-
```java
242-
File myFile = new File("My Large_File.txt");
243-
FileInputStream stream = new FileInputStream(myFile);
244-
245-
BoxFolder rootFolder = BoxFolder.getRootFolder(api);
246-
BoxFile.Info fileInfo = rootFolder.uploadLargeFile(inputStream, "My_Large_File.txt", myFile.length());
247-
```
248-
249-
[upload-large-file]: http://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/BoxFolder.html#uploadLargeFile(java.io.InputStream,%20java.lang.String,%20long)
250-
251-
252262
Copy a File
253263
-----------
254264

src/main/java/com/box/sdk/BoxAPIConnection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public BoxAPIConnection(String clientID, String clientSecret, String accessToken
8585
this.autoRefresh = true;
8686
this.maxRequestAttempts = DEFAULT_MAX_ATTEMPTS;
8787
this.refreshLock = new ReentrantReadWriteLock();
88-
this.userAgent = "Box Java SDK v2.8.0";
88+
this.userAgent = "Box Java SDK v2.8.1";
8989
this.listeners = new ArrayList<BoxAPIConnectionListener>();
9090
}
9191

0 commit comments

Comments
 (0)