File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
src/main/java/com/ning/http/multipart Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,6 @@ public long read(ByteBuffer buffer) throws IOException {
79
79
int overallLength = 0 ;
80
80
81
81
final int maxLength = buffer .remaining ();
82
- if (maxLength <= 0 ) {
83
- return maxLength ;
84
- }
85
82
86
83
if (startPart == parts .size () && endWritten ) {
87
84
return -1 ;
@@ -208,7 +205,8 @@ public long read(ByteBuffer buffer) throws IOException {
208
205
private void initializeByteArrayBody (FilePart filePart )
209
206
throws IOException {
210
207
211
- ByteArrayOutputStream output = generateByteArrayBody (filePart );
208
+ ByteArrayOutputStream output = new ByteArrayOutputStream ();
209
+ filePart .sendData (output );
212
210
213
211
initializeBuffer (output );
214
212
@@ -397,13 +395,6 @@ private long handleByteArrayPart(WritableByteChannel target,
397
395
return writeToTarget (target , output );
398
396
}
399
397
400
- private ByteArrayOutputStream generateByteArrayBody (FilePart filePart )
401
- throws IOException {
402
- final ByteArrayOutputStream output = new ByteArrayOutputStream ();
403
- filePart .sendData (output );
404
- return output ;
405
- }
406
-
407
398
private long handleFileEnd (WritableByteChannel target , FilePart filePart )
408
399
throws IOException {
409
400
You can’t perform that action at this time.
0 commit comments