Пример #1
0
 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();
 }
Пример #2
0
 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();
 }
Пример #3
0
 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;
 }