Examples of writeLong()


Examples of be.bagofwords.util.WrappedSocketConnection.writeLong()

            WrappedSocketConnection connection = listenToChangesConnections.get(i);
            try {
                connection.writeString(interfaceName);
                connection.writeInt(keys.length);
                for (Long key : keys) {
                    connection.writeLong(key);
                }
                connection.flush();
                long response = connection.readLong();
                if (response != LONG_OK) {
                    throw new RuntimeException("Unexpected response " + response + " from " + connection.getInetAddress());
View Full Code Here

Examples of bm.core.io.SerializerOutputStream.writeLong()

            final DataOutputStream dos2 = new DataOutputStream( cos );
            final SerializerOutputStream out = new SerializerOutputStream( dos2 );
            out.writeByte( VERSION );
            out.writeByte( (byte) (encrypted ? 1 : 0) );
            out.writeString( Net.getDeviceGuid() != null ? Net.getDeviceGuid() : "" );
            out.writeLong( Net.getDeviceId() != null ? Net.getDeviceId().longValue() : 0 );
            serialize( out );
            final long crc  = cos.getCRC();
            out.writeString( "END_OF_DATA" );
            out.writeLong( crc );
            pe.setMessage( ResourceManager.getResource( "bm.net.rpc.WaitingResponse" ) );
View Full Code Here

Examples of ch.ethz.inf.vs.scandium.util.DatagramWriter.writeLong()

    writer.write(version.getMajor(), VERSION_BITS);
    writer.write(version.getMinor(), VERSION_BITS);

    writer.write(epoch, EPOCH_BITS);
    writer.writeLong(sequenceNumber, SEQUENCE_NUMBER_BITS);

    length = fragmentBytes.length;
    writer.write(length, LENGTH_BITS);

    writer.writeBytes(fragmentBytes);
View Full Code Here

Examples of co.cask.cdap.common.io.BinaryEncoder.writeLong()

    try {
      // Write the schema hash
      os.write(STREAM_EVENT_SCHEMA.getSchemaHash().toByteArray());

      StreamEventDataCodec.encode(event, encoder);
      encoder.writeLong(timestamp);
      return os.toByteArray();

    } catch (IOException e) {
      // It should never happens, otherwise something very wrong.
      throw Throwables.propagate(e);
View Full Code Here

Examples of co.cask.cdap.common.io.Encoder.writeLong()

    try {
      // Write the schema hash
      os.write(STREAM_EVENT_SCHEMA.getSchemaHash().toByteArray());

      StreamEventDataCodec.encode(event, encoder);
      encoder.writeLong(timestamp);
      return os.toByteArray();

    } catch (IOException e) {
      // It should never happens, otherwise something very wrong.
      throw Throwables.propagate(e);
View Full Code Here

Examples of co.cask.tephra.snapshot.BinaryEncoder.writeLong()

  @Override
  public void encode(OutputStream out, TransactionSnapshot snapshot) {
    BinaryEncoder encoder = new BinaryEncoder(out);
    try {
      encoder.writeLong(snapshot.getTimestamp());
      encoder.writeLong(snapshot.getReadPointer());
      encoder.writeLong(snapshot.getWritePointer());
      // supporting old versions of codecs
      encodeObsoleteAttributes(encoder);
      encodeInvalid(encoder, snapshot.getInvalid());
View Full Code Here

Examples of co.cask.tigon.sql.io.GDATEncoder.writeLong()

          break;
        case INT:
          encoder.writeInt(Integer.valueOf(value));
          break;
        case LONG:
          encoder.writeLong(Long.valueOf(value));
          break;
        case DOUBLE:
          encoder.writeDouble(Double.valueOf(value));
          break;
        case STRING:
View Full Code Here

Examples of com.alibaba.dubbo.common.serialize.ObjectOutput.writeLong()

    }

    @Test
    public void test_Long() throws Exception {
        ObjectOutput objectOutput = serialization.serialize(url, byteArrayOutputStream);
        objectOutput.writeLong(123L);
        objectOutput.flushBuffer();

        ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(
                byteArrayOutputStream.toByteArray());
        ObjectInput deserialize = serialization.deserialize(url, byteArrayInputStream);
View Full Code Here

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

  public void test_0() throws Exception {
    SerializeWriter writer = new SerializeWriter();
    writer.append('A');
    writer.writeInt(156);
    Assert.assertEquals("A156", writer.toString());
    writer.writeLong(345);
    Assert.assertEquals("A156345", writer.toString());

  }

  public void test_1() throws Exception {
View Full Code Here

Examples of com.caucho.hessian.io.Hessian2Output.writeLong()

    }

    out.writeInt(HmtpPacketType.QUERY.ordinal());
    writeAddress(out, to);
    writeAddress(out, from);
    out.writeLong(id);
    out.writeObject(value);

    out.flushBuffer();
  }
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.