public int pushLimit(int paramInt) throws InvalidProtocolBufferNanoException { if (paramInt < 0) throw InvalidProtocolBufferNanoException.negativeSize(); paramInt += bufferPos; int i = currentLimit; if (paramInt > i) throw InvalidProtocolBufferNanoException.truncatedMessage(); currentLimit = paramInt; recomputeBufferSizeAfterLimit(); return i; }
public void skipRawBytes(int paramInt) throws IOException { if (paramInt < 0) throw InvalidProtocolBufferNanoException.negativeSize(); if (bufferPos + paramInt > currentLimit) { skipRawBytes(currentLimit - bufferPos); throw InvalidProtocolBufferNanoException.truncatedMessage(); } if (paramInt <= bufferSize - bufferPos) { bufferPos += paramInt; return; } throw InvalidProtocolBufferNanoException.truncatedMessage(); }
public byte[] readRawBytes(int paramInt) throws IOException { if (paramInt < 0) throw InvalidProtocolBufferNanoException.negativeSize(); if (bufferPos + paramInt > currentLimit) { skipRawBytes(currentLimit - bufferPos); throw InvalidProtocolBufferNanoException.truncatedMessage(); } if (paramInt <= bufferSize - bufferPos) { byte[] arrayOfByte = new byte[paramInt]; System.arraycopy(buffer, bufferPos, arrayOfByte, 0, paramInt); bufferPos += paramInt; return arrayOfByte; } throw InvalidProtocolBufferNanoException.truncatedMessage(); }
public int readRawVarint32() throws IOException { int i = readRawByte(); if (i >= 0) ; int k; do { return i; i &= 127; j = readRawByte(); if (j >= 0) return i | j << 7; i |= (j & 0x7F) << 7; j = readRawByte(); if (j >= 0) return i | j << 14; i |= (j & 0x7F) << 14; k = readRawByte(); if (k >= 0) return i | k << 21; j = readRawByte(); k = i | (k & 0x7F) << 21 | j << 28; i = k; } while (j >= 0); int j = 0; while (true) { if (j >= 5) break label133; i = k; if (readRawByte() >= 0) break; j += 1; } label133: throw InvalidProtocolBufferNanoException.malformedVarint(); }
public byte readRawByte() throws IOException { if (bufferPos == bufferSize) throw InvalidProtocolBufferNanoException.truncatedMessage(); byte[] arrayOfByte = buffer; int i = bufferPos; bufferPos = (i + 1); return arrayOfByte[i]; }
public int readTag() throws IOException { if (isAtEnd()) { lastTag = 0; return 0; } lastTag = readRawVarint32(); if (lastTag == 0) throw InvalidProtocolBufferNanoException.invalidTag(); return lastTag; }
public void readMessage(MessageNano paramMessageNano) throws IOException { int i = readRawVarint32(); if (recursionDepth >= recursionLimit) throw InvalidProtocolBufferNanoException.recursionLimitExceeded(); i = pushLimit(i); recursionDepth += 1; paramMessageNano.mergeFrom(this); checkLastTagWas(0); recursionDepth -= 1; popLimit(i); }
public long readRawVarint64() throws IOException { int i = 0; long l = 0L; while (i < 64) { int j = readRawByte(); l |= (j & 0x7F) << i; if ((j & 0x80) == 0) return l; i += 7; } throw InvalidProtocolBufferNanoException.malformedVarint(); }
public boolean skipField(int paramInt) throws IOException { switch (WireFormatNano.getTagWireType(paramInt)) { default: throw InvalidProtocolBufferNanoException.invalidWireType(); case 0: readInt32(); return true; case 1: readRawLittleEndian64(); return true; case 2: skipRawBytes(readRawVarint32()); return true; case 3: skipMessage(); checkLastTagWas(WireFormatNano.makeTag(WireFormatNano.getTagFieldNumber(paramInt), 4)); return true; case 4: return false; case 5: } readRawLittleEndian32(); return true; }
public void checkLastTagWas(int paramInt) throws InvalidProtocolBufferNanoException { if (lastTag != paramInt) throw InvalidProtocolBufferNanoException.invalidEndTag(); }