faster disassembling

This commit is contained in:
Honfika
2013-09-08 23:13:35 +02:00
parent 1a1f5dc2db
commit 591e47b964
11 changed files with 46 additions and 23 deletions
@@ -34,7 +34,11 @@ public class ABCInputStream extends InputStream {
public static final boolean DEBUG_READ = false;
public void startBuffer() {
bufferOs = new ByteArrayOutputStream();
if (bufferOs == null) {
bufferOs = new ByteArrayOutputStream();
} else {
bufferOs.reset();
}
}
public byte[] stopBuffer() {
@@ -42,7 +46,7 @@ public class ABCInputStream extends InputStream {
return new byte[0];
}
byte ret[] = bufferOs.toByteArray();
bufferOs = null;
bufferOs.reset();
return ret;
}