示例#1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void readAndExecuteOperations(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.servlet.http.HttpServletRequest req, java.io.InputStream body, javax.servlet.ServletOutputStream output) throws java.io.IOException, javax.servlet.ServletException
        public virtual void ReadAndExecuteOperations(UriInfo uriInfo, HttpHeaders httpHeaders, HttpServletRequest req, Stream body, ServletOutputStream output)
        {
            _results = new StreamingBatchOperationResults(JsonFactory.createJsonGenerator(output), output);
            IDictionary <int, string> locations = _results.Locations;

            ParseAndPerform(uriInfo, httpHeaders, req, body, locations);
            _results.close();
        }
示例#2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private org.codehaus.jackson.JsonNode write(java.util.Map<String, Object> row) throws java.io.IOException, org.neo4j.server.rest.domain.JsonParseException
        private JsonNode Write(IDictionary <string, object> row)
        {
            MemoryStream  @out = new MemoryStream();
            JsonGenerator json = _jsonFactory.createJsonGenerator(@out);

            json.writeStartObject();
            try
            {
                (new GraphExtractionWriter()).Write(json, row.Keys, new MapRow(row), _checker);
            }
            finally
            {
                json.writeEndObject();
                json.flush();
            }
            return(JsonHelper.jsonNode(@out.ToString(UTF_8.name())));
        }