Examples of buffer()


Examples of com.arjuna.ats.arjuna.state.OutputBuffer.buffer()

            {
                OutputBuffer outBuf = new OutputBuffer();
                InputBuffer inBuf;

                uid.pack(outBuf);
                inBuf = new InputBuffer(outBuf.buffer());

                //host = inet4AddressToString(inBuf.unpackInt());
                inBuf.unpackInt();
                inBuf.unpackInt(); // process
View Full Code Here

Examples of com.arjuna.ats.arjuna.state.OutputObjectState.buffer()

     */
    public byte[] getRecoveryState() throws Exception {
        OutputObjectState oos = new OutputObjectState();
        oos.packString(this.getClass().getName());
        this.saveState(oos);
        return oos.buffer();
    }
}
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.netty.buffer.ChannelBufferOutputStream.buffer()

        ObjectOutputStream oout = new CompactObjectOutputStream(bout);
        oout.writeObject(obj);
        oout.flush();
        oout.close();

        ChannelBuffer buffer = bout.buffer();
        int objectSize = buffer.readableBytes();
        writeInt(objectSize);
        buffer.getBytes(0, this, objectSize);
    }
View Full Code Here

Examples of com.google.gwt.typedarrays.shared.Uint8Array.buffer()

    Uint8Array view = TypedArrays.createUint8Array(4);
    view.set(0, 1);
    view.set(1, 0);
    view.set(2, 128);
    view.set(3, 129);
    String str = JsUtils.stringFromArrayBuffer(view.buffer());
    assertEquals(4, str.length());
    assertEquals(1, str.charAt(0));
    assertEquals(0, str.charAt(1));
    assertEquals(128, str.charAt(2));
    assertEquals(129, str.charAt(3));
View Full Code Here

Examples of com.jcraft.jogg.Buffer.buffer()

            return OV_EIMPL;

        op.packet_base = new byte[opb.bytes()];
        op.packet = 0;
        op.bytes = opb.bytes();
        System.arraycopy(opb.buffer(), 0, op.packet_base, 0, op.bytes);
        op.b_o_s = 0;
        op.e_o_s = 0;
        op.granulepos = 0;
        return 0;
    }
View Full Code Here

Examples of com.jcraft.jogg.SyncState.buffer()

            // (which is guaranteed to be small and only contain the Vorbis
            // stream initial header) We need the first page to get the stream
            // serialno.

            // submit a 4k block to libvorbis' Ogg layer
            int index = oy.buffer(4096);
            buffer = oy.data;
            try {
                bytes = input.read(buffer, index, 4096);
            }
            catch (Exception e) {
View Full Code Here

Examples of com.trolltech.qt.core.QBuffer.buffer()

          }
          QPixmap p = icon.pixmap(32, 32);
          QImage i = p.toImage();
           i.save(buffer, filetype.toUpperCase());
           buffer.close();
           QByteArray b = new QByteArray(buffer.buffer());
           if (!b.isNull() && !b.isEmpty())
             query.bindValue(":icon", b.toByteArray());
           else
             return;
    }
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.buffer()

    GeometryFactory factory = new GeometryFactory(precisionModel, polygons[0].getSRID());

    Geometry temp = factory.createGeometry(polygons[0]);
    for (int i = 1; i < polygons.length; i++) {
      Geometry polygon = factory.createGeometry(polygons[i]);
      temp = temp.union(polygon.buffer(Math.pow(10.0, -(precision - 1))));
    }
    if (temp instanceof Polygon) {
      MultiPolygon mp = factory.createMultiPolygon(new Polygon[] { (Polygon) temp });
      response.setGeometry(converter.toDto(mp));
    } else if (temp instanceof MultiPolygon && temp.getNumGeometries() != 0
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.buffer()

    Envelope envelope = new Envelope(0, 1, 0, 1);
    Geometry orig = JTS.toGeometry(envelope);
    Geometry m2 = geoservice.transform(orig, "EPSG:4326", "EPSG:900913");
    // equality check on buffer, JTS equals does not do the trick !
    Assert.assertTrue(m.buffer(0.01).contains(m2));
    Assert.assertTrue(m2.buffer(0.01).contains(m));
  }

  private List<String> getIdsFromModel(Map<String, Object> model) {
    Object o = model.get(RestController.FEATURE_COLLECTION);
    Assert.assertTrue(o instanceof List<?>);
View Full Code Here

Examples of com.vividsolutions.jts.geom.GeometryCollection.buffer()

        }
       
        GeometryCollection gc;
        gc = JTSUtils.getFactory().createGeometryCollection(polys);
       
        Geometry union = gc.buffer(0);
        return JTSUtils.toShape(union);
    }
   
    /**
     * Computes the region of element e that is above the threshold thrsh.
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.