1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 00:58:50 -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 {
if (!mPeeked) {
mPeekedByte = read();
mPeekedByte = mIn.read();
mPeeked = true;
}
return mPeekedByte;