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
1 changed files with 1 additions and 1 deletions

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;