public int deserialize()

in src/main/java/com/amazonaws/encryptionsdk/model/CipherBlockHeaders.java [278:301]


  public int deserialize(/*@ nullable */ final byte[] b, final int off) {
    if (b == null) {
      return 0;
    }

    // @ assert b != null;
    int parsedBytes = 0;
    try {
      if (nonceLength_ > 0 && nonce_ == null) {
        parsedBytes += parseNonce(b, off + parsedBytes);
      }

      if (contentLength_ < 0) {
        parsedBytes += parseContentLength(b, off + parsedBytes);
      }

      isComplete_ = true;
    } catch (ParseException e) {
      // this results when we do partial parsing and there aren't enough
      // bytes to parse; so just return the bytes parsed thus far.
    }

    return parsedBytes;
  }