/** * @param transport HTTP transport * @param rootUrl root URL of the service * @param servicePath service path * @param httpRequestInitializer HTTP request initializer or {@code null} for none */ protected Builder(HttpTransport transport, String rootUrl, String servicePath, HttpRequestInitializer httpRequestInitializer) { super(transport, rootUrl, servicePath, new ProtoObjectParser(), httpRequestInitializer); }
@SuppressWarnings("unchecked") public <T> T parseAndClose(InputStream in, Charset charset, Class<T> dataClass) throws IOException { return (T) ProtocolBuffers.parseAndClose(in, (Class<? extends MessageLite>) dataClass); }
public Object parseAndClose(InputStream in, Charset charset, Type dataType) throws IOException { if (dataType instanceof Class<?>) { return parseAndClose(in, charset, (Class<?>) dataType); } throw new UnsupportedOperationException("dataType must be of Class<? extends MessageList>"); }