Examples of writeBytes()


Examples of com.facebook.presto.spi.block.BlockBuilder.writeBytes()

    }

    private static Block createSingleValueBlock(Slice expectedValue)
    {
        BlockBuilder blockBuilder = new VariableWidthBlockBuilder(new BlockBuilderStatus());
        blockBuilder.writeBytes(expectedValue, 0, expectedValue.length()).closeEntry();
        return blockBuilder.build();
    }
}
View Full Code Here

Examples of com.facebook.presto.spi.block.FixedWidthBlockBuilder.writeBytes()

        for (Slice expectedValue : expectedValues) {
            if (expectedValue == null) {
                blockBuilder.appendNull();
            }
            else {
                blockBuilder.writeBytes(expectedValue, 0, expectedValue.length()).closeEntry();
            }
        }
        assertBlock(blockBuilder, expectedValues);
        assertBlock(blockBuilder.build(), expectedValues);
    }
View Full Code Here

Examples of com.facebook.presto.spi.block.VariableWidthBlockBuilder.writeBytes()

    }

    private static Block createSingleValueBlock(Slice expectedValue)
    {
        BlockBuilder blockBuilder = new VariableWidthBlockBuilder(new BlockBuilderStatus());
        blockBuilder.writeBytes(expectedValue, 0, expectedValue.length()).closeEntry();
        return blockBuilder.build();
    }
}
View Full Code Here

Examples of com.fasterxml.storemate.shared.ByteContainer.writeBytes()

                conn = (HttpURLConnection) url.openConnection();
                conn.setDoOutput(true);
                conn.setFixedLengthStreamingMode(bc.byteLength());
                conn = initRequest("PUT", conn, path, timeoutMsecs);
                out = conn.getOutputStream();
                bc.writeBytes(out);
            } else {
                InputStream in; // closed in copy()
                File f = content.contentAsFile();
                // !!! TODO: add wrapper for calculating hash sum, if not yet calculated
                if (f != null) {
View Full Code Here

Examples of com.google.code.or.io.util.XSerializer.writeBytes()

    //
    final XSerializer s = new XSerializer(64);
    s.writeInt(buildClientCapabilities(), 4);
    s.writeInt(this.maximumPacketLength, 4);
    s.writeInt(this.clientCollation > 0 ? this.clientCollation : ctx.getServerCollation(), 1);
    s.writeBytes((byte)0, 23); // Fixed, all 0
    s.writeNullTerminatedString(StringColumn.valueOf(this.user.getBytes(this.encoding)));
    s.writeInt(20, 1); // the length of the SHA1 encrypted password
    s.writeBytes(MySQLUtils.password41OrLater(this.password.getBytes(this.encoding), ctx.getScramble().getBytes(this.encoding)));
    if(this.initialSchema != null) s.writeNullTerminatedString(StringColumn.valueOf(this.initialSchema.getBytes(this.encoding)));
   
View Full Code Here

Examples of com.google.opengse.iobuffer.IOBuffer.writeBytes()

        if (transfer > 0) {
          // If we're at the start of a multipart byterange, output boundary.
          if (range.getNumRanges() > 1 && rangeCurrentPos == p.getStart()) {
            // It's ok for additional CRLFs to preceed first boundary.
            newIOBuffer.writeBytes("\r\n--".getBytes());
            newIOBuffer.writeBytes(rangeBoundary.getBytes());
            if (rangeContentType != null) {
              newIOBuffer.writeBytes("\r\n".getBytes());
              newIOBuffer.writeBytes("Content-Type: ".getBytes());
              newIOBuffer.writeBytes(rangeContentType.getBytes());
View Full Code Here

Examples of com.google.protobuf.CodedOutputStream.writeBytes()

         case BYTES:
            for (Object value : collection) {
               if (value instanceof byte[]) {
                  value = ByteString.copyFrom((byte[]) value);
               }
               out.writeBytes(fieldNumber, (ByteString) value);
            }
            break;
         case INT64:
            for (Object value : collection) {
               out.writeInt64(fieldNumber, (Long) value);
View Full Code Here

Examples of com.higherfrequencytrading.chronicle.Excerpt.writeBytes()

        final Excerpt excerpt = chr.createExcerpt();

        for (int i = 0; i < NUMBER_OF_ENTRIES; ++i) {
            excerpt.startExcerpt(128);
            excerpt.writeBytes("test");
            excerpt.finish();
        }

        assertEquals("Chronicle should hold all values", NUMBER_OF_ENTRIES, excerpt.size());
View Full Code Here

Examples of com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.writeBytes()

          try {
            ch.writeByte(OChannelBinaryProtocol.PUSH_DATA);
            ch.writeInt(Integer.MIN_VALUE);
            ch.writeByte(OChannelDistributedProtocol.PUSH_DISTRIBUTED_CONFIG);
            ch.writeBytes(clusterDbConfigurations.get(iDatabaseName).toStream());

          } catch (IOException e) {
            e.printStackTrace();
          } finally {
            ch.releaseExclusiveLock();
View Full Code Here

Examples of com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.writeBytes()

        final OChannelBinaryAsynchClient network = beginRequest(OChannelBinaryProtocol.REQUEST_RECORD_CREATE);
        lastNetworkUsed = network;

        try {
          network.writeShort((short) iRid.clusterId);
          network.writeBytes(iContent);
          network.writeByte(iRecordType);
          network.writeByte((byte) iMode);

        } finally {
          endRequest(network);
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.