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:
parent
29117ae7a6
commit
92239739b0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user