Examples of writeTo()


Examples of com.hazelcast.nio.Packet.writeTo()

        final int bufferSize = SocketOptions.DEFAULT_BUFFER_SIZE_BYTE;
        final ByteBuffer buffer = ByteBuffer.allocate(totalSize > bufferSize ? bufferSize : totalSize);
        final Packet packet = new Packet(data, serializationService.getPortableContext());
        boolean complete = false;
        while (!complete) {
            complete = packet.writeTo(buffer);
            buffer.flip();
            try {
                socketChannelWrapper.write(buffer);
            } catch (Exception e) {
                throw ExceptionUtil.rethrow(e);
View Full Code Here

Examples of com.hazelcast.nio.serialization.DataAdapter.writeTo()

        final int bufferSize = ClientConnectionManagerImpl.BUFFER_SIZE;
        final ByteBuffer buffer = ByteBuffer.allocate(totalSize > bufferSize ? bufferSize : totalSize);
        final DataAdapter packet = new DataAdapter(data);
        boolean complete = false;
        while (!complete) {
            complete = packet.writeTo(buffer);
            buffer.flip();
            try {
                socketChannelWrapper.write(buffer);
            } catch (Exception e) {
                throw ExceptionUtil.rethrow(e);
View Full Code Here

Examples of com.itextpdf.text.pdf.ByteBuffer.writeTo()

      buf.append(" cm ");
      buf.append(xobj.getBytes());
      buf.append(" Do Q\n");
      buf.append("EMC\n");
      buf.flush();
      buf.writeTo(baos);
      // if we were inside a text block, we've introduced an ET, so we'll need to write a BT
      if (inText)
        btWrite = true;
    }
   
View Full Code Here

Examples of com.liferay.faces.util.io.ResourceOutputStream.writeTo()

            // int to String.
            logger.trace("Handling - responseBufferSize=[{0}]", Integer.toString(responseContentLength));
          }

          // Write the data to the response.
          resourceOutputStream.writeTo(externalContext.getResponseOutputStream());
          resourceOutputStream.flush();
          resourceOutputStream.close();

          if (logger.isDebugEnabled()) {
            logger.debug(
View Full Code Here

Examples of com.linkedin.databus.core.DbusEventInternalReadable.writeTo()

    currentCheckpoint.bootstrapCheckPoint();

    // write ckpt back to client
    DbusEventInternalReadable checkpointEvent =
        _eventFactory.createCheckpointEvent(currentCheckpoint);
    checkpointEvent.writeTo(_writeChannel, _encoding);
    // LOG.info("Sending snapshot checkpoint to client: " + currentCheckpoint.toString());
  }

  public long getNumRowsWritten()
  {
View Full Code Here

Examples of com.lowagie.text.pdf.FdfWriter.writeTo()

            fdf.setFieldAsString("name", "Bruno Lowagie");
            fdf.setFieldAsString("address", "Baeyensstraat 121, Sint-Amandsberg");
            fdf.setFieldAsString("postal_code", "BE-9040");
            fdf.setFieldAsString("email", "bruno@lowagie.com");
            fdf.setFile("SimpleRegistrationForm.pdf");
            fdf.writeTo(new FileOutputStream("SimpleRegistrationForm.fdf"));

            // merging the FDF file
            PdfReader pdfreader = new PdfReader("SimpleRegistrationForm.pdf");
            PdfStamper stamp = new PdfStamper(pdfreader, new FileOutputStream("registered_fdf.pdf"));
            FdfReader fdfreader = new FdfReader("SimpleRegistrationForm.fdf");
View Full Code Here

Examples of com.mongodb.gridfs.GridFSDBFile.writeTo()

    }
    //kind of clone
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    try
     
      fileForOutput.writeTo(baos);

    } catch (IOException e) {
      this.logger.error("Error getting file: {}", e.toString());
    }
   
View Full Code Here

Examples of com.netflix.suro.sink.Sink.writeTo()

        RoutingMap.RoutingInfo info = routingMap.getRoutingInfo(msg.getRoutingKey());

        if (info == null) {
            Sink defaultSink = sinkManager.getSink("default");
            input.setPause(defaultSink.checkPause());
            defaultSink.writeTo(msg);
        } else if (info.doFilter(msg)) {
            List<Route> routes = info.getWhere();
            for (Route route : routes) {
                if (route.doFilter(msg)) {
                    Sink sink = sinkManager.getSink(route.getSink());
View Full Code Here

Examples of com.netflix.suro.sink.kafka.KafkaSink.writeTo()

        jsonMapper.registerSubtypes(new NamedType(KafkaSink.class, "kafka"));
        KafkaSink sink = jsonMapper.readValue(description, new TypeReference<Sink>(){});
        sink.open();
        Iterator<Message> msgIterator = new MessageSetReader(TestKafkaSink.createMessageSet(topicName, 2)).iterator();
        while (msgIterator.hasNext()) {
            sink.writeTo(new StringMessage(msgIterator.next()));
        }
        sink.close();
    }
}
View Full Code Here

Examples of com.nexirius.util.TextToken.writeTo()

            type.writeTo(out);
            out.write(' ');
            classname.writeTo(out);
            out.write(' ');
            name.writeTo(out);
            out.write(' ');

            child.writeDataTo(out);
            out.write('\n');
        }
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.