Examples of RawData


Examples of ch.ethz.inf.vs.elements.RawData

    return counter < amount;
  }

  @Override
  public RawData next() {
    RawData raw = new RawData(
        messages.get(ptr_message), address,ports[ptr_port]);
    if (++ptr_message >= 1 << 16) {
      ptr_message = 0;
      ptr_port++;
    }
View Full Code Here

Examples of ch.ethz.inf.vs.elements.RawData

   
  public void sendRequests() {
    try {
      System.out.println("Send requests to "+destination+":"+PORT);
      while (running) {
        RawData data = producer.next();
        DatagramPacket p = new DatagramPacket(data.getBytes(), data.getSize());
        p.setAddress(destination);
        p.setPort(PORT);
        socket.send(p);
        meter.requested();
      }
View Full Code Here

Examples of jodd.madvoc.result.RawData

  @Action(value = "${id}", extension = EXT_PNG)
  public RawResultData viewPng() {
    byte[] bytes = imageCache.readImage(id + '.' + EXT_PNG);

    return new RawData(bytes, EXT_PNG_MIME);
  }
View Full Code Here

Examples of jodd.madvoc.result.RawData

  @Action(value = "${id}", extension = EXT_JPG)
  public RawResultData viewJpg() {
    byte[] bytes = imageCache.readImage(id + '.' + EXT_JPG);

    return new RawData(bytes, EXT_JPG_MIME);
  }
View Full Code Here

Examples of jodd.madvoc.result.RawData

  @Action
  public RawData view() {
    String result = "this is some raw direct result";
    byte[] bytes = CharUtil.toAsciiByteArray(result.toCharArray());
    return new RawData(bytes, MimeTypes.MIME_TEXT_HTML);
  }
View Full Code Here

Examples of jodd.madvoc.result.RawData

  };


  @Action("/${:method}")
  public RawData madvocRawImage() {
    return new RawData(SMALLEST_GIF, MimeTypes.lookupMimeType("gif"));
  }
View Full Code Here

Examples of org.directwebremoting.io.RawData

     */
    public OutboundVariable convertOutbound(Object data, OutboundContext outctx) throws ConversionException
    {
        // We don't actually need to cast to RawData, but we want to make sure
        // that that's was we've really been given
        RawData raw = (RawData) data;
        return new NonNestedOutboundVariable(raw.toString());
    }
View Full Code Here

Examples of org.geoserver.wps.process.RawData

    @DescribeResult(name = "result", description = "Output raster", meta = {
            "mimeTypes=application/json,text/xml", "chosenMimeType=outputMimeType" })
    public RawData execute(
            @DescribeParameter(name = "data", description = "Input features", meta = { "mimeTypes=application/json,text/xml" }) final RawData input,
            @DescribeParameter(name = "outputMimeType", min = 0) final String outputMimeType) {
        return new RawData() {

            @Override
            public String getMimeType() {
                return outputMimeType;
            }
View Full Code Here

Examples of org.geoserver.wps.process.RawData

        }
    }

    @Override
    public void encode(Object value, OutputStream os) throws Exception {
        RawData rd = (RawData) value;
        IOUtils.copy(rd.getInputStream(), os);
    }
View Full Code Here

Examples of org.geoserver.wps.process.RawData

                kvp.put("version", "1.0.0");
                kvp.put("request", "GetExecutionResult");
                kvp.put("executionId", executionId);
                kvp.put("outputId", file.getName());
                if(o instanceof RawData) {
                  RawData rawData = (RawData) o;
                  kvp.put("mimetype", rawData.getMimeType());
                } else {
                  kvp.put("mimetype", cppio.getMimeType());
                }
                outputReference.setHref(ResponseUtils.buildURL(request.getBaseUrl(), "ows", kvp, URLType.SERVICE));
                outputReference.setMimeType(cppio.getMimeType());
            } else {
                // encode as data
                DataType data = f.createDataType();
                output.setData(data);

                if (ppio instanceof LiteralPPIO) {
                    LiteralDataType literal = f.createLiteralDataType();
                    data.setLiteralData(literal);

                    literal.setValue(((LiteralPPIO) ppio).encode(o));
                } else if (ppio instanceof BoundingBoxPPIO) {
                    BoundingBoxType bbox = ((BoundingBoxPPIO) ppio).encode(o);
                    data.setBoundingBoxData(bbox);
                } else if (ppio instanceof ComplexPPIO) {
                    ComplexDataType complex = f.createComplexDataType();
                    data.setComplexData(complex);

                    ComplexPPIO cppio = (ComplexPPIO) ppio;
                    complex.setMimeType(cppio.getMimeType());

                    if (cppio instanceof RawDataPPIO) {
                        RawData rawData = (RawData) o;
                        complex.setMimeType(rawData.getMimeType());
                        complex.setEncoding("base64");
                        complex.getData().add(new RawDataEncoderDelegate(rawData));
                    } else if (cppio instanceof XMLPPIO) {
                        // encode directly
                        complex.getData().add(new XMLEncoderDelegate((XMLPPIO) cppio, o));
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.