We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1a820e commit c4f1e08Copy full SHA for c4f1e08
src/main/java/qiniu/ip17mon/Locator.java
@@ -155,11 +155,7 @@ public static Locator loadFromLocal(String filePath) throws IOException {
155
public static Locator loadFromStream(InputStream in) throws Exception {
156
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
157
byte[] buffer = new byte[16 * 1024];
158
- while (in.read(buffer) != -1) {
159
- byteArrayOutputStream.write(buffer);
160
- }
161
-
162
- int n = 0;
+ int n;
163
164
while ((n = in.read(buffer)) != -1) {
165
byteArrayOutputStream.write(buffer, 0, n);
0 commit comments