com.google.api.client.protobuf
Class ProtoObjectParser
java.lang.Object
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)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProtoObjectParser
public ProtoObjectParser()
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.