in src/main/java/com/amazonaws/encryptionsdk/model/KeyBlob.java [400:437]
public int deserialize(final byte[] b, final int off) {
if (b == null) {
return 0;
}
int parsedBytes = 0;
try {
if (keyProviderIdLen_ < 0) {
parsedBytes += parseKeyProviderIdLen(b, off + parsedBytes);
}
if (keyProviderId_ == null) {
parsedBytes += parseKeyProviderId(b, off + parsedBytes);
}
if (keyProviderInfoLen_ < 0) {
parsedBytes += parseKeyProviderInfoLen(b, off + parsedBytes);
}
if (keyProviderInfo_ == null) {
parsedBytes += parseKeyProviderInfo(b, off + parsedBytes);
}
if (encryptedKeyLen_ < 0) {
parsedBytes += parseKeyLen(b, off + parsedBytes);
}
if (encryptedKey_ == null) {
parsedBytes += parseKey(b, off + parsedBytes);
}
isComplete_ = true;
} catch (ParseException e) {
// this results when we do partial parsing and there aren't enough
// bytes to parse; ignore it and return the bytes parsed thus far.
}
return parsedBytes;
}