Skip to content

Commit

Permalink
Use GA version Java SDK.
Browse files Browse the repository at this point in the history
  • Loading branch information
xingwu1 committed Apr 7, 2017
1 parent 6564aea commit 67cef0c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions Java/PoolAndResourceFile/pom.xml
Expand Up @@ -17,22 +17,22 @@
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-batch</artifactId>
<version>1.0.0-rc2</version>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.rest</groupId>
<artifactId>client-runtime</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-client-runtime</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.10</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
Expand Down
Expand Up @@ -7,7 +7,6 @@

import com.microsoft.azure.storage.*;
import com.microsoft.azure.storage.blob.*;
import org.apache.commons.io.IOUtils;

import com.microsoft.azure.batch.*;
import com.microsoft.azure.batch.auth.BatchSharedKeyCredentials;
Expand Down Expand Up @@ -299,8 +298,9 @@ public static void main(String argv[]) throws Exception {
// Get the task command output file
CloudTask task = client.taskOperations().getTask(jobId, "mytask");

InputStream stream = client.fileOperations().getFileFromTask(jobId, task.id(), STANDARD_CONSOLE_OUTPUT_FILENAME);
String fileContent = IOUtils.toString(stream, "UTF-8");
ByteArrayOutputStream stream = new ByteArrayOutputStream();
client.fileOperations().getFileFromTask(jobId, task.id(), STANDARD_CONSOLE_OUTPUT_FILENAME, stream);
String fileContent = stream.toString("UTF-8");
System.out.println(fileContent);
}
else {
Expand Down

0 comments on commit 67cef0c

Please sign in to comment.