1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 02:12:15 -05:00

microoptimize peekableInputStream's peek method to not do an extra

method dispatch and boolean check on every peek.
This commit is contained in:
Jesse Vincent 2011-05-24 21:35:18 -04:00
parent 29117ae7a6
commit 92239739b0

View File

@ -30,7 +30,7 @@ public class PeekableInputStream extends InputStream {
public int peek() throws IOException { public int peek() throws IOException {
if (!mPeeked) { if (!mPeeked) {
mPeekedByte = read(); mPeekedByte = mIn.read();
mPeeked = true; mPeeked = true;
} }
return mPeekedByte; return mPeekedByte;