Decode an entity from the initialized Avro Decoder using the DatumReader.

@param decoder
The decoder to decode the entity fields
@param reader
The Avro DatumReader that will read the entity with the decoder.
@return The entity.
11017
public static <T> T readAvroEntity(Decoder decoder, DatumReader<T> reader) {
    try {
      return reader.read(null, decoder);
    } catch (IOException e) {
      throw new SerializationException("Could not deserialize Avro entity", e);
    }
  }
1370490
public static InputStream decode(DataBinder binder, InputStream stream) throws ParserConfigurationException, SAXException, IOException {
        XML.newSAXParser().parse(stream, new XDBHandler(binder));
        return stream;
    }
304672
def Deserialize(self, reader):
        
        super(Block, self).Deserialize(reader)

        self.Transactions = []
        byt = reader.ReadVarInt()
        transaction_length = byt

        if transaction_length < 1:
            raise Exception('Invalid format')

        for i in range(0, transaction_length):
            tx = Transaction.DeserializeFrom(reader)
            self.Transactions.append(tx)

        if MerkleTree.ComputeRoot([tx.Hash for tx in self.Transactions]) != self.MerkleRoot:
            raise Exception("Merkle Root Mismatch")
113100
def decode_string(reader) -> bytes:
    
    length_bytes = yield from read_or_raise(reader, 2)
    str_length = unpack("!H", length_bytes)
    if str_length[0]:
        byte_str = yield from read_or_raise(reader, str_length[0])
        try:
            return byte_str.decode(encoding='utf-8')
        except:
            return str(byte_str)
    else:
        return ''
698100
public Object parse(Reader reader) {
        return jsonSlurper.parse(new StringReader(YamlConverter.convertYamlToJson(reader)));
    }
813836
@Override
  public NetworkConnectionServiceMessage decode(final byte[] data) {
    try (final ByteArrayInputStream bais = new ByteArrayInputStream(data)) {
      try (final DataInputStream dais = new DataInputStream(bais)) {
        final String connFactoryId = dais.readUTF();
        final Identifier srcId = factory.getNewInstance(dais.readUTF());
        final Identifier destId = factory.getNewInstance(dais.readUTF());
        final int size = dais.readInt();
        final List list = new ArrayList(size);
        final Codec codec = connFactoryMap.get(connFactoryId).getCodec();
        Boolean isStreamingCodec = isStreamingCodecMap.get(codec);
        if (isStreamingCodec == null) {
          isStreamingCodec = codec instanceof StreamingCodec;
          isStreamingCodecMap.putIfAbsent(codec, isStreamingCodec);
        }

        if (isStreamingCodec) {
          for (int i = 0; i < size; i++) {
            list.add(((StreamingCodec) codec).decodeFromStream(dais));
          }
        } else {
          for (int i = 0; i < size; i++) {
            final int byteSize = dais.readInt();
            final byte[] bytes = new byte[byteSize];
            if (dais.read(bytes) == -1) {
              LOG.log(Level.FINE, "No data read because end of stream was reached");
            }
            list.add(codec.decode(bytes));
          }
        }

        return new NetworkConnectionServiceMessage(
            connFactoryId,
            srcId,
            destId,
            list
        );
      }
    } catch (final IOException e) {
      throw new RuntimeException("IOException", e);
    }
  }
27490
public <T> T read(final Reader reader, final DataTypeDescriptor<T> descriptor)
			throws Exception {
		if (reader == null) throw new NullPointerException("reader");
		if (descriptor == null) throw new NullPointerException("descriptor");

		JsonParser parser = factory.createParser(reader);
		return read(parser, descriptor);
	}
423113
def Deserialize(self, reader: BinaryReader):
        

        self.Type = StateType(reader.ReadByte())

        self.Key = reader.ReadVarBytes(max=100)
        self.Field = reader.ReadVarString(max=32).decode('utf-8')
        self.Value = reader.ReadVarBytes(max=65535)

        if self.Type == StateType.Account:
            self.CheckAccountState()
        elif self.Type == StateType.Validator:
            self.CheckValidatorState()
670988
void decrypt(PdfReader reader) {
        PdfEncryption decrypt = reader.getDecrypt();
        if (decrypt != null) {
            originalValue = value;
            decrypt.setHashKey(objNum, objGen);
            bytes = PdfEncodings.convertToBytes(value, null);
            bytes = decrypt.decryptByteArray(bytes);
            value = PdfEncodings.convertToString(bytes, null);
        }
    }
781029
public void parse (Reader reader) {
		try {
			char[] data = new char[1024];
			int offset = 0;
			while (true) {
				int length = reader.read(data, offset, data.length - offset);
				if (length == -1) break;
				if (length == 0) {
					char[] newData = new char[data.length * 2];
					System.arraycopy(data, 0, newData, 0, data.length);
					data = newData;
				} else
					offset += length;
			}
			parse(data, 0, offset);
		} catch (IOException ex) {
			throw new SerializationException(ex);
		} finally {
			StreamUtils.closeQuietly(reader);
		}
	}
483052
@Override
  @SuppressWarnings("unchecked")
  public D read(D reuse, Decoder in) throws IOException {    
    resolver.configure(in);
    D result = (D) read(reuse, getExpected(), resolver);
    resolver.drain();
    return result;
  }
1374359
@Override
    protected RDBMSEntityReader getReader()
    {
        if (reader == null)
        {
            reader = new RDBMSEntityReader(getJPAQuery(), kunderaQuery, kunderaMetadata);
        }
        return reader;
    }
914180
def Deserialize(self, reader):
        
        super(Header, self).Deserialize(reader)
        if reader.ReadByte() != 0:
            raise Exception('Incorrect Header Format')
375345
private Decoder getColumnDecoder(Schema writtenFieldAvroSchema, InputStream in) {
    // Use a special Avro decoder that has special handling for int, long,
    // and String types. See ColumnDecoder for more information.
    if (writtenFieldAvroSchema.getType() == Type.INT
        || writtenFieldAvroSchema.getType() == Type.LONG
        || writtenFieldAvroSchema.getType() == Type.STRING) {
      return new ColumnDecoder(in);
    } else {
      return DecoderFactory.get().binaryDecoder(in, null);
    }
  }
1050145
public Object parse(Reader reader) {
        if (reader == null) {
            throw new IllegalArgumentException("Reader must not be null");
        }

        Object content;
        JsonParser parser = createParser();
        content = parser.parse(reader);
        return content;
    }
366130
public static Object load(Reader reader) throws IOException {
    Map<String, Object> data = getSnakeYaml().load(reader);
    return modelMapper(data);
  }
538998
@Override
  public LatLng read(JsonReader reader) throws IOException {
    if (reader.peek() == JsonToken.NULL) {
      reader.nextNull();
      return null;
    }

    double lat = 0;
    double lng = 0;
    boolean hasLat = false;
    boolean hasLng = false;

    reader.beginObject();
    while (reader.hasNext()) {
      String name = reader.nextName();
      if ("lat".equals(name) || "latitude".equals(name)) {
        lat = reader.nextDouble();
        hasLat = true;
      } else if ("lng".equals(name) || "longitude".equals(name)) {
        lng = reader.nextDouble();
        hasLng = true;
      }
    }
    reader.endObject();

    if (hasLat && hasLng) {
      return new LatLng(lat, lng);
    } else {
      return null;
    }
  }