Class ProtoObjectParser (1.42.3)

public class ProtoObjectParser implements ObjectParser

Beta
Parses protocol buffer HTTP response content into a protocol buffer message.

Implementation is immutable and therefore thread-safe.

Data-classes are expected to extend MessageLite.

All Charset parameters are ignored for protocol buffers.

Inheritance

Object > ProtoObjectParser

Implements

ObjectParser

Constructors

ProtoObjectParser()

public ProtoObjectParser()

Methods

<T>parseAndClose(InputStream in, Charset charset, Class<T> dataClass)

public T <T>parseAndClose(InputStream in, Charset charset, Class<T> dataClass)

Parses the given input stream into a new instance of the the given data class of key/value pairs and closes the input stream.

Parameters
NameDescription
inInputStream
charsetCharset
dataClassClass<T>
Returns
TypeDescription
T
Exceptions
TypeDescription
IOException

<T>parseAndClose(Reader reader, Class<T> dataClass)

public T <T>parseAndClose(Reader reader, Class<T> dataClass)

Parses the given reader into a new instance of the the given data class of key/value pairs and closes the reader.

Parameters
NameDescription
readerReader
dataClassClass<T>
Returns
TypeDescription
T
Exceptions
TypeDescription
IOException

parseAndClose(InputStream in, Charset charset, Type dataType)

public Object parseAndClose(InputStream in, Charset charset, Type dataType)

Parses the given input stream into a new instance of the the given data type of key/value pairs and closes the input stream.

Parameters
NameDescription
inInputStream
charsetCharset
dataTypeType
Returns
TypeDescription
Object
Exceptions
TypeDescription
IOException

parseAndClose(Reader reader, Type dataType)

public Object parseAndClose(Reader reader, Type dataType)

Parses the given reader into a new instance of the the given data type of key/value pairs and closes the reader.

Parameters
NameDescription
readerReader
dataTypeType
Returns
TypeDescription
Object
Exceptions
TypeDescription
IOException