Examples of stream()


Examples of com.aragost.javahg.internals.GenericLogCommand.stream()

     * @return Map mapping a {@link Changeset} to a {@link Phase}
     */
    public Map<Changeset, Phase> phases(String... revs) {
        GenericLogCommand cmd = new GenericLogCommand(this).template("{node} {phase}\\0");
        cmd.rev(revs);
        HgInputStream stream = cmd.stream();
        Map<Changeset, Phase> result = Maps.newHashMap();
        try {
            while (!stream.isEof()) {
                String node = stream.textUpTo(' ');
                String phaseName = stream.textUpTo('\0');
View Full Code Here

Examples of com.tinkerpop.gremlin.driver.ResultSet.stream()

        final Cluster cluster = Cluster.open();
        final Client client = cluster.connect();

        final ResultSet results = client.submit("[1,2,3,4,5,6,7,8,9]");
        final AtomicInteger counter = new AtomicInteger(0);
        results.stream().map(i -> i.get(Integer.class) * 2).forEach(i -> assertEquals(counter.incrementAndGet() * 2, Integer.parseInt(i.toString())));

        cluster.close();
    }

    @Test
View Full Code Here

Examples of com.webobjects.foundation.NSData.stream()

      InputStream anInputStream;
     
          if (request.formValueForKey(FormKeys.qqfilename) != null) {
            aFileName = (String) request.formValueForKey(FormKeys.qqfilename);
            NSData data = (NSData) request.formValueForKey(FormKeys.qqfile);
            anInputStream = data.stream();
          } else if (request.formValueForKey(FormKeys.qqfile) != null) {
        aFileName = (String) request.formValueForKey(FormKeys.qqfile);
        anInputStream = (request.contentInputStream() != null) ? request.contentInputStream() : request.content().stream();
          } else {
            log.error("Unable to obtain filename from form values: " + request.formValueKeys());
View Full Code Here

Examples of io.vertx.rxcore.java.impl.Regulator.stream()

      });

    // Create a WriteStream that can only handle 5 writes per second
    RatedWriteStream out=new RatedWriteStream(vertx,5);

    assertCountThenComplete(regulator.stream(res,out),401);
  }

}
View Full Code Here

Examples of it.unimi.dsi.mg4j.document.DocumentCollection.stream()

      if ( request.getParameter( "m" ) != null && request.getParameter( "doc" ) != null ) {
        DocumentCollection collection = (DocumentCollection)getServletContext().getAttribute( "collection" );
        if ( collection == null ) LOGGER.fatal( "The servlet context does not contain a document collection." );
        response.setContentType( request.getParameter( "m" ) );
        response.setCharacterEncoding( "UTF-8" );
        InputStream rawContent = collection.stream( Integer.parseInt( request.getParameter( "doc" ) ) );
        for( int i = skip; i-- != 0; ) rawContent.reset();
        IOUtils.copy( rawContent, response.getOutputStream() );
      }
    } catch( RuntimeException e ) {
      e.printStackTrace();
View Full Code Here

Examples of java.util.List.stream()

                    "A message with an [%s] op code requires that the [%s] argument has at least one set of valid maven coordinates specified.",
                    Tokens.OPS_USE, Tokens.ARGS_COORDINATES);
            throw new OpProcessorException(msg, ResponseMessage.build(message).code(ResponseStatusCode.REQUEST_ERROR_INVALID_REQUEST_ARGUMENTS).result(msg).create());
        }

        if (!coordinates.stream().allMatch(ControlOpProcessor::validateCoordinates)) {
            final String msg = String.format(
                    "A message with an [%s] op code requires that all [%s] specified are valid maven coordinates with a group, artifact, and version.",
                    Tokens.OPS_USE, Tokens.ARGS_COORDINATES);
            throw new OpProcessorException(msg, ResponseMessage.build(message).code(ResponseStatusCode.REQUEST_ERROR_INVALID_REQUEST_ARGUMENTS).result(msg).create());
        }
View Full Code Here

Examples of javafx.collections.ObservableList.stream()

                List<Double> prefWidth = new ArrayList<>();

                try {
                    ObservableList cl = table.getColumns();
                    cl.stream().forEach((cl1) -> {
                        prefWidth.add(((TableColumn) cl1).getWidth());
                    });
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
View Full Code Here

Examples of org.apache.batik.svggen.SVGGraphics2D.stream()

    root.setAttributeNS(null, "viewBox", "0 0 " + viewboxWidth + " "
        + viewboxHeight);
    // Finally, stream out SVG
    // character to byte encoding
    SVGContentImage svgImage = new SVGContentImage();
    svgGenerator.stream(root, svgImage.getWriter(), config.getVisibility()
        .isUseCSS(), false);
    return svgImage;
  }

 
View Full Code Here

Examples of org.apache.batik.svggen.SVGGraphics2D.stream()

    }

    try
    {
      StringWriter swriter = new StringWriter();
      grx.stream(swriter);
      return new BatikRenderer(swriter.getBuffer().toString(), areaHyperlinks);
    }
    catch (SVGGraphics2DIOException e)
    {
      throw new JRRuntimeException(e);
View Full Code Here

Examples of org.apache.batik.svggen.SVGGraphics2D.stream()

      //httpServletResponse.setHeader("Content-Disposition","attachment; filename=\"" + requestedFile + "\"");
          Writer out = new OutputStreamWriter(System.out, "UTF-8");

          //Create an instance of the SVG Generator.
          SVGGraphics2D svgGenerator = new SVGGraphics2D(doc);
          svgGenerator.stream(out, useCSS);
         

    } catch (Exception er) {
      log.error("ERROR ", er);
      System.out.println("Error exporting: " + er);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.