This commit is contained in:
RedKale
2016-02-23 11:34:41 +08:00
parent 55fe1fb517
commit 7ed6e4db3e
3 changed files with 5 additions and 5 deletions

View File

@@ -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();
}

View File

@@ -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 (;;) {

View File

@@ -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;
}