/** * Reserved for internal use. Parses the operation response as an entity. Reads entity data from * the specified <code>JsonParser</code> using the specified class type and optionally projects * the entity result with the specified resolver into a {@link TableResult} object. * * @param parser The <code>JsonParser</code> to read the data to parse from. * @param httpStatusCode The HTTP status code returned with the operation response. * @param clazzType The class type <code>T</code> implementing {@link TableEntity} for the entity * returned. Set to <code>null</code> to ignore the returned entity and copy only response * properties into the {@link TableResult} object. * @param resolver An {@link EntityResolver} instance to project the entity into an instance of * type <code>R</code>. Set to <code>null</code> to return the entitys as instance of the * class type <code>T</code>. * @param options A {@link TableRequestOptions} object that specifies execution options such as * retry policy and timeout settings for the operation. * @param opContext An {@link OperationContext} object used to track the execution of the * operation. * @return A {@link TableResult} object with the parsed operation response. * @throws InstantiationException if an error occurs while constructing the result. * @throws IllegalAccessException if an error occurs in reflection while parsing the result. * @throws StorageException if a storage service error occurs. * @throws IOException if an error occurs while accessing the stream. * @throws JsonParseException if an error occurs while parsing the stream. */ static <T extends TableEntity, R> TableResult parseSingleOpResponse( final InputStream inStream, final TableRequestOptions options, final int httpStatusCode, final Class<T> clazzType, final EntityResolver<R> resolver, final OperationContext opContext) throws JsonParseException, IOException, InstantiationException, IllegalAccessException, StorageException { JsonParser parser = createJsonParserFromStream(inStream); try { final TableResult res = parseJsonEntity( parser, clazzType, null /*HashMap<String, PropertyPair> classProperties*/, resolver, options, opContext); res.setHttpStatusCode(httpStatusCode); return res; } finally { parser.close(); } }