This commit is contained in:
@@ -143,7 +143,7 @@ public class HttpRequest extends Request<HttpContext> {
|
||||
header.addValue(name, value);
|
||||
}
|
||||
}
|
||||
array.reset();
|
||||
array.clear();
|
||||
if (buffer.hasRemaining()) array.write(buffer, buffer.remaining());
|
||||
if (this.contentType != null && this.contentType.contains("boundary=")) {
|
||||
this.boundary = true;
|
||||
@@ -321,7 +321,7 @@ public class HttpRequest extends Request<HttpContext> {
|
||||
|
||||
this.header.clear();
|
||||
this.params.clear();
|
||||
this.array.reset();
|
||||
this.array.clear();
|
||||
super.recycle();
|
||||
}
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ public final class MultiContext {
|
||||
|
||||
private String readLine(boolean bd) throws IOException { // bd : 是否是读取boundary
|
||||
byte lasted = '\r';
|
||||
buf.reset();
|
||||
buf.clear();
|
||||
final int bc = this.endboundarray.length;
|
||||
int c = 0;
|
||||
for (;;) {
|
||||
|
||||
@@ -30,7 +30,7 @@ public final class ByteArray {
|
||||
content = new byte[Math.max(128, size)];
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
public void clear() {
|
||||
this.count = 0;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ public final class ByteArray {
|
||||
|
||||
public String toStringAndReset(final Charset charset) {
|
||||
String str = toString(0, count, charset);
|
||||
reset();
|
||||
clear();
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user