Examples of Buffer


Examples of org.fusesource.hawtdb.util.buffer.Buffer

        String exchangeId = getMockEndpoint("mock:result").getReceivedExchanges().get(0).getExchangeId();

        // the exchange should NOT be in the completed repo as it was confirmed
        final HawtDBFile hawtDBFile = repo.getHawtDBFile();
        final HawtDBCamelMarshaller marshaller = new HawtDBCamelMarshaller();
        final Buffer confirmKeyBuffer = marshaller.marshallKey(exchangeId);
        Buffer bf = hawtDBFile.execute(new Work<Buffer>() {
            public Buffer execute(Transaction tx) {
                Index<Buffer, Buffer> index = hawtDBFile.getRepositoryIndex(tx, "repo1-completed", false);
                return index.get(confirmKeyBuffer);
            }
        });
View Full Code Here

Examples of org.gjt.sp.jedit.Buffer

    try
    {
      if(selection != null)
      {
        Buffer buffer = view.getBuffer();

        searchInSelection(buffer);
      }
      else
      {
        int current = 0;

loop:        for(int i = 0; i < files.length; i++)
        {
          String file = files[i];
          current++;

          long currentTime = System.currentTimeMillis();
          if(currentTime - lastStatusTime > 250)
          {
            setProgressValue(current);
            lastStatusTime = currentTime;
          }

          Buffer buffer = jEdit.openTemporary(null,null,file,false);
          if(buffer == null)
            continue loop;

          doHyperSearch(buffer);
        };
View Full Code Here

Examples of org.glassfish.grizzly.Buffer

        if (!connection.isOpen()) {
            completionHandler.failed(new IllegalStateException("Connection is not open."));
            return;
        }

        final Buffer message = Buffers.wrap(connection.getTransport().getMemoryManager(), buffer);

        final EmptyCompletionHandler emptyCompletionHandler = new EmptyCompletionHandler() {
            @Override
            public void cancelled() {
                if (completionHandler != null) {
View Full Code Here

Examples of org.gstreamer.Buffer

     *
     */
    class AppSinkNewBufferListener implements AppSink.NEW_BUFFER {
        public void newBuffer(AppSink elem)
        {
            Buffer buffer = sink.pullBuffer();

            Caps caps = buffer.getCaps();
            Structure struct = caps.getStructure(0);

            int width = struct.getInteger("width");
            int height = struct.getInteger("height");
            if (width < 1 || height < 1) {
                return;
            }
            IntBuffer rgb;
            if (passDirectBuffer) {
                rgb = buffer.getByteBuffer().asIntBuffer();
            } else {
                rgb = IntBuffer.allocate(width * height);
                rgb.put(buffer.getByteBuffer().asIntBuffer()).flip();
            }
           
            listener.rgbFrame(width, height, rgb);
           
            //
            // Dispose of the gstreamer buffer immediately to avoid more being
            // allocated before the java GC kicks in
            //
            buffer.dispose();
        }
View Full Code Here

Examples of org.gstreamer.Buffer

                    byte[] data = new byte[width * height * 2];
                    public void needData(AppSrc elem, int size) {
                        System.out.println("NEED_DATA: Element=" + elem.getNativeAddress()
                                + " size=" + size);
                        Arrays.fill(data, color++);
                        Buffer buffer = new Buffer(data.length);
                        buffer.getByteBuffer().put(data);
                appsrc.pushBuffer(buffer);
                    }
                });
                appsrc.connect(new AppSrc.ENOUGH_DATA() {
          public void enoughData(AppSrc elem) {
View Full Code Here

Examples of org.gwtnode.core.node.buffer.Buffer

                gwtCodeSocket = Socket.create();
                gwtCodeSocket.connect(gwtCodePort, gwtCodeHost);
                proxySocket.onData(new StringOrBufferEventHandler() {
                    @Override
                    protected void onEvent() {
                        Buffer buffer = getBuffer();
                        proxyStream.append(buffer);
                        Message message;
                        do {
                            message = logMessage(proxyStream, true);
                            if (message != null) {
                                gwtCodeSocket.write(message.toBuffer());
                            }
                        } while (message != null);
                        //gwtCodeSocket.write(buffer);
                    }
                });
                gwtCodeSocket.onData(new StringOrBufferEventHandler() {
                    @Override
                    protected void onEvent() {
                        Buffer buffer = getBuffer();
                        gwtCodeStream.append(buffer);
                        Message message;
                        do {
                            message = logMessage(gwtCodeStream, false);
                            if (message != null) {
View Full Code Here

Examples of org.jbls.util.Buffer

            comment = lastComment;
          }

          key = key.replaceAll("-", "");

          Buffer b = org.jbls.Hashing.HashMain.hashKey(0, 0, key);
          b.removeDWord()//length
          int prod = b.removeDWord()//Product

          cdkeys.add(new CDKey(key, prod, comment));
        } else {
          lastComment = key.substring(1).trim();
        }
View Full Code Here

Examples of org.jboss.blacktie.jatmibroker.xatmi.Buffer

        JABTransaction.resume(tx);
      } else {
        log.debug("service_request tx same as current");
      }

      Buffer request = requestMessage.getBuffer();
      log.debug("service_request tpcall");
      Response response = connection.tpcall(serviceName, request,
          noTimeout ? Connection.TPNOTIME : 0);
      responseMessage = new JABMessage(response);
      log.debug("service_request responsed");
View Full Code Here

Examples of org.jboss.errai.bus.server.io.buffers.Buffer

  }

  @Override
  public boolean deliver(final MessageQueue queue, final Message message) throws IOException {
    try {
      final Buffer buffer = queue.getBuffer();
      final BufferColor bufferColor = queue.getBufferColor();

      BufferHelper.encodeAndWrite(buffer, bufferColor, message);
    }
    finally {
View Full Code Here

Examples of org.jboss.narayana.blacktie.jatmibroker.xatmi.Buffer

      cd.tprecv(0);
      fail("Expected e.getEvent() == Connection.TPEV_SVCFAIL");
    } catch (ResponseException e) {
      assertTrue(e.getEvent() == Connection.TPEV_SVCFAIL);
      assertTrue(e.getTperrno() == Connection.TPEEVENT);
      Buffer rcvbuf = e.getReceived();
      assertTrue(TestTPConversation.strcmp(rcvbuf,
          "test_tprecv_TPEV_SVCFAIL_service") == 0);
    } catch (ConnectionException e) {
      fail("Expected e.getEvent() == Connection.TPEV_SVCFAIL");
    }
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.