com.google.api.client.protobuf
Class ProtoObjectParser

java.lang.Object
  extended by com.google.api.client.protobuf.ProtoObjectParser
All Implemented Interfaces:
ObjectParser

public class ProtoObjectParser
extends Object
implements ObjectParser

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.

Since:
1.10
Author:
Matthias Linder (mlinder)

Constructor Summary
ProtoObjectParser()
           
 
Method Summary
<T> T
parseAndClose(InputStream in, Charset charset, Class<T> dataClass)
           
 Object parseAndClose(InputStream in, Charset charset, Type dataType)
           
<T> T
parseAndClose(Reader reader, Class<T> dataClass)
           
 Object parseAndClose(Reader reader, Type dataType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtoObjectParser

public ProtoObjectParser()
Method Detail

parseAndClose

public <T> T parseAndClose(InputStream in,
                           Charset charset,
                           Class<T> dataClass)
                throws IOException
Specified by:
parseAndClose in interface ObjectParser
Throws:
IOException

parseAndClose

public Object parseAndClose(InputStream in,
                            Charset charset,
                            Type dataType)
                     throws IOException
Specified by:
parseAndClose in interface ObjectParser
Throws:
IOException

parseAndClose

public <T> T parseAndClose(Reader reader,
                           Class<T> dataClass)
                throws IOException
Specified by:
parseAndClose in interface ObjectParser
Throws:
IOException

parseAndClose

public Object parseAndClose(Reader reader,
                            Type dataType)
                     throws IOException
Specified by:
parseAndClose in interface ObjectParser
Throws:
IOException


Copyright © 2011-2012 Google. All Rights Reserved.