Examples of toBytes()


Examples of ch.aonyx.broker.ib.api.util.RequestBuilder.toBytes()

    }

    @Override
    public byte[] getBytes() {
        final RequestBuilder builder = createRequestBuilder();
        return builder.toBytes();
    }

    private RequestBuilder createRequestBuilder() {
        final RequestBuilder builder = new ByteArrayRequestBuilder();
        builder.append(OutgoingMessageId.REAL_TIME_BAR_UNSUBSCRIPTION_REQUEST.getId());
View Full Code Here

Examples of co.cask.cdap.common.queue.QueueName.toBytes()

        }

        // This row is a queue entry. If currentQueue is null, meaning it's a new queue encountered during scan.
        if (currentQueue == null) {
          QueueName queueName = QueueEntryRow.getQueueName(appName, flowName, keyValue);
          currentQueue = queueName.toBytes();
          currentQueueRowPrefix = QueueEntryRow.getQueueRowPrefix(queueName);
          consumerConfig = configCache.getConsumerConfig(currentQueue);
        }

        if (consumerConfig == null) {
View Full Code Here

Examples of co.cask.tigon.data.queue.QueueName.toBytes()

        }

        // This row is a queue entry. If currentQueue is null, meaning it's a new queue encountered during scan.
        if (currentQueue == null) {
          QueueName queueName = QueueEntryRow.getQueueName(appName, flowName, keyValue);
          currentQueue = queueName.toBytes();
          currentQueueRowPrefix = QueueEntryRow.getQueueRowPrefix(queueName);
          consumerConfig = configCache.getConsumerConfig(currentQueue);
        }

        if (consumerConfig == null) {
View Full Code Here

Examples of com.alibaba.druid.hdriver.impl.mapping.HMapping.toBytes()

        }
       
        String fieldName = ((SQLIdentifierExpr) condition.getLeft()).getName();
        Object value = SQLEvalVisitorUtils.eval(dbType, condition.getRight(), statement.getParameters());

        byte[] bytes = mapping.toBytes(fieldName, value);
        if (mapping.isRow(fieldName)) {
            if (filter == null && condition.getOperator() == SQLBinaryOperator.GreaterThanOrEqual) {
                scan.setStartRow(bytes);
                return null;
            } else if (filter == null && condition.getOperator() == SQLBinaryOperator.LessThan) {
View Full Code Here

Examples of com.alibaba.druid.sql.ast.expr.SQLHexExpr.toBytes()

*/
public class LiteralHexadecimalTest extends TestCase {
    public void test_0() throws Exception {
        String sql = "x'E982B1E7A195275C73'";
        SQLHexExpr hex = (SQLHexExpr) new MySqlExprParser(sql).expr();
        Assert.assertEquals("邱硕'\\s", new String(hex.toBytes(), "utf-8"));
    }

    public void test_1() throws Exception {
        String sql = "x'0D0A'";
        SQLHexExpr hex = (SQLHexExpr) new MySqlExprParser(sql).expr();
View Full Code Here

Examples of com.alibaba.fastjson.serializer.SerializeWriter.toBytes()

                serializer.config(feature, true);
            }

            serializer.write(object);

            return out.toBytes("UTF-8");
        } finally {
            out.close();
        }
    }
View Full Code Here

Examples of com.alibaba.otter.canal.parse.driver.mysql.packets.HeaderPacket.toBytes()

        logger.info("COM_BINLOG_DUMP with position:{}", binlogDumpCmd);
        HeaderPacket binlogDumpHeader = new HeaderPacket();
        binlogDumpHeader.setPacketBodyLength(cmdBody.length);
        binlogDumpHeader.setPacketSequenceNumber((byte) 0x00);
        PacketManager.write(connector.getChannel(), new ByteBuffer[] { ByteBuffer.wrap(binlogDumpHeader.toBytes()),
                ByteBuffer.wrap(cmdBody) });
    }

    public MysqlConnection fork() {
        MysqlConnection connection = new MysqlConnection();
View Full Code Here

Examples of com.alibaba.otter.canal.parse.driver.mysql.packets.client.BinlogDumpCommandPacket.toBytes()

    private void sendBinlogDump(String binlogfilename, Long binlogPosition) throws IOException {
        BinlogDumpCommandPacket binlogDumpCmd = new BinlogDumpCommandPacket();
        binlogDumpCmd.binlogFileName = binlogfilename;
        binlogDumpCmd.binlogPosition = binlogPosition;
        binlogDumpCmd.slaveServerId = this.slaveId;
        byte[] cmdBody = binlogDumpCmd.toBytes();

        logger.info("COM_BINLOG_DUMP with position:{}", binlogDumpCmd);
        HeaderPacket binlogDumpHeader = new HeaderPacket();
        binlogDumpHeader.setPacketBodyLength(cmdBody.length);
        binlogDumpHeader.setPacketSequenceNumber((byte) 0x00);
View Full Code Here

Examples of com.alibaba.otter.canal.parse.driver.mysql.packets.client.ClientAuthenticationPacket.toBytes()

        clientAuth.setPassword(password);
        clientAuth.setServerCapabilities(handshakePacket.serverCapabilities);
        clientAuth.setDatabaseName(defaultSchema);
        clientAuth.setScrumbleBuff(joinAndCreateScrumbleBuff(handshakePacket));

        byte[] clientAuthPkgBody = clientAuth.toBytes();
        HeaderPacket h = new HeaderPacket();
        h.setPacketBodyLength(clientAuthPkgBody.length);
        h.setPacketSequenceNumber((byte) (header.getPacketSequenceNumber() + 1));

        PacketManager.write(channel,
View Full Code Here

Examples of com.alibaba.otter.canal.parse.driver.mysql.packets.client.QueryCommandPacket.toBytes()

    }

    public OKPacket update(String updateString) throws IOException {
        QueryCommandPacket cmd = new QueryCommandPacket();
        cmd.setQueryString(updateString);
        byte[] bodyBytes = cmd.toBytes();
        PacketManager.write(channel, bodyBytes);

        logger.debug("read update result...");
        byte[] body = PacketManager.readBytes(channel, PacketManager.readHeader(channel, 4).getPacketBodyLength());
        if (body[0] < 0) {
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.