| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.mojo_shell_apk; | 5 package org.chromium.mojo_shell_apk; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 | 8 |
| 9 import java.io.BufferedInputStream; | 9 import java.io.BufferedInputStream; |
| 10 import java.io.BufferedOutputStream; | 10 import java.io.BufferedOutputStream; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 throws IOException { | 81 throws IOException { |
| 82 byte[] buffer = new byte[BUFFER_SIZE]; | 82 byte[] buffer = new byte[BUFFER_SIZE]; |
| 83 OutputStream outputStream = new BufferedOutputStream(new FileOutputStrea
m(outputFile)); | 83 OutputStream outputStream = new BufferedOutputStream(new FileOutputStrea
m(outputFile)); |
| 84 int read; | 84 int read; |
| 85 while ((read = inputStream.read(buffer, 0, BUFFER_SIZE)) > 0) { | 85 while ((read = inputStream.read(buffer, 0, BUFFER_SIZE)) > 0) { |
| 86 outputStream.write(buffer, 0, read); | 86 outputStream.write(buffer, 0, read); |
| 87 } | 87 } |
| 88 outputStream.close(); | 88 outputStream.close(); |
| 89 } | 89 } |
| 90 } | 90 } |
| OLD | NEW |