Examples of writeBytes()


Examples of br.org.scadabr.dnp34j.master.common.utils.Buffer.writeBytes()

    for (int i = 0; i < values.length; i++) {
      if ((qualifier & 0xF0) == 0x10) {
        getData.writeByte((byte) values[i]);
      } else {
        getData.writeBytes(values[i]);
      }

      getData.writeBytes(newDataObjects[i].data);
      setDB(values[i], newDataObjects[i].data, group, variation);
    }
View Full Code Here

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

  // Serialization //////////////////////////////////////////////////
 
  @Override
  public byte[] toByteArray() {
    DatagramWriter writer = new DatagramWriter();
    writer.writeBytes(super.toByteArray());

    int listLength = ecPointFormatList.size();
    // list length + list length field (1 byte)
    writer.write(listLength + 1, LENGTH_BITS);
    writer.write(listLength, LIST_LENGTH_BITS);
View Full Code Here

Examples of ch.ethz.ssh2.packets.TypesWriter.writeBytes()

  {
    int req_id = generateNextRequestID();

    TypesWriter tw = new TypesWriter();
    tw.writeString(path, charsetName);
    tw.writeBytes(createAttrs(attr));

    if (debug != null)
    {
      debug.println("Sending SSH_FXP_SETSTAT...");
      debug.flush();
View Full Code Here

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

    }

    @Test
    public void test_Bytes() throws Exception {
        ObjectOutput objectOutput = serialization.serialize(url, byteArrayOutputStream);
        objectOutput.writeBytes("123中华人民共和国".getBytes());
        objectOutput.flushBuffer();

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

Examples of com.alibaba.dubbo.remoting.buffer.ChannelBuffer.writeBytes()

                        previousData.writeBytes(grizzlyBuffer.toByteBuffer());
                        frame = previousData;
                    } else {
                        int size = previousData.readableBytes() + grizzlyBuffer.remaining();
                        frame = ChannelBuffers.dynamicBuffer(size > bufferSize ? size : bufferSize);
                        frame.writeBytes(previousData, previousData.readableBytes());
                        frame.writeBytes(grizzlyBuffer.toByteBuffer());
                    }
                } else {
                    frame = ChannelBuffers.wrappedBuffer(grizzlyBuffer.toByteBuffer());
                }
View Full Code Here

Examples of com.couchbase.client.deps.io.netty.buffer.ByteBuf.writeBytes()

        int flags = 0;
        Object content = document.content();
        ByteBuf encoded = Unpooled.buffer();

        if (content instanceof String) {
            encoded.writeBytes(((String) content).getBytes(CharsetUtil.UTF_8));
        } else if (content instanceof Long) {
            flags |= SPECIAL_LONG;
            encoded.writeBytes(encodeNum((Long) content, 8));
        } else if (content instanceof Integer) {
            flags |= SPECIAL_INT;
View Full Code Here

Examples of com.esotericsoftware.kryo.io.Output.writeBytes()

/** @author Nathan Sweet <misc@n4te.com> */
public class InputOutputTest extends KryoTestCase {
  public void testOutputStream () throws IOException {
    ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    Output output = new Output(buffer, 2);
    output.writeBytes(new byte[] {11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26});
    output.writeBytes(new byte[] {31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46});
    output.writeBytes(new byte[] {51, 52, 53, 54, 55, 56, 57, 58});
    output.writeBytes(new byte[] {61, 62, 63, 64, 65});
    output.flush();

View Full Code Here

Examples of com.esotericsoftware.kryo.io.UnsafeMemoryOutput.writeBytes()

      if (output instanceof UnsafeOutput) {
        UnsafeOutput unsafeOutput = (UnsafeOutput)output;
        unsafeOutput.writeBytes(object, offset, len);
      } else if (output instanceof UnsafeMemoryOutput) {
        UnsafeMemoryOutput unsafeOutput = (UnsafeMemoryOutput)output;
        unsafeOutput.writeBytes(object, offset, len);
      } else {
        long off;
        Unsafe unsafe = unsafe();
        for (off = offset; off < offset + len - 8; off += 8) {
          output.writeLong(unsafe.getLong(object, off));
View Full Code Here

Examples of com.esotericsoftware.kryo.io.UnsafeOutput.writeBytes()

    }

    final public void write (Output output, Object object) {
      if (output instanceof UnsafeOutput) {
        UnsafeOutput unsafeOutput = (UnsafeOutput)output;
        unsafeOutput.writeBytes(object, offset, len);
      } else if (output instanceof UnsafeMemoryOutput) {
        UnsafeMemoryOutput unsafeOutput = (UnsafeMemoryOutput)output;
        unsafeOutput.writeBytes(object, offset, len);
      } else {
        long off;
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.netty.buffer.ChannelBuffer.writeBytes()

        synchronized (deflater) {
            if (gzip) {
                crc.update(in);
                if (writeHeader) {
                    compressed.writeBytes(gzipHeader);
                    writeHeader = false;
                }
            }

            deflater.setInput(in);
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.