Package com.hazelcast.nio

Examples of com.hazelcast.nio.DynamicByteBuffer


        setClassDefinition(cd);
    }

    ByteBufferObjectDataInput(byte buffer[], SerializationService service, ByteOrder order) {
        super();
        this.buffer = new DynamicByteBuffer(buffer);
        this.buffer.order(order);
        this.service = service;
    }
View Full Code Here


    private final SerializationService service;

    private final byte[] utfBuffer = new byte[1024];

    ByteBufferObjectDataOutput(int size, SerializationService service, ByteOrder order) {
        this.buffer = new DynamicByteBuffer(size, false);
        this.service = service;
        this.buffer.order(order);
    }
View Full Code Here

        this.service = service;
        this.buffer.order(order);
    }

    ByteBufferObjectDataOutput(ByteBuffer buffer, SerializationService service, ByteOrder order) {
        this.buffer = new DynamicByteBuffer(buffer);
        buffer.order(order);
        this.service = service;
    }
View Full Code Here

    public byte toByteArray()[] {
        if (buffer == null) {
            return new byte[0];
        }
        final DynamicByteBuffer duplicate = buffer.duplicate();
        duplicate.flip();
        final byte newBuffer[] = new byte[duplicate.limit()];
        duplicate.get(newBuffer);
        return newBuffer;
    }
View Full Code Here

        setClassDefinition(cd);
    }

    ByteBufferObjectDataInput(byte[] buffer, SerializationService service, ByteOrder order) {
        super();
        this.buffer = new DynamicByteBuffer(buffer);
        this.buffer.order(order);
        this.service = service;
    }
View Full Code Here

    private final SerializationService service;

    private byte[] utfBuffer;

    ByteBufferObjectDataOutput(int size, SerializationService service, ByteOrder order) {
        this.buffer = new DynamicByteBuffer(size, false);
        this.service = service;
        this.buffer.order(order);
    }
View Full Code Here

        this.service = service;
        this.buffer.order(order);
    }

    ByteBufferObjectDataOutput(ByteBuffer buffer, SerializationService service, ByteOrder order) {
        this.buffer = new DynamicByteBuffer(buffer);
        buffer.order(order);
        this.service = service;
    }
View Full Code Here

    public byte toByteArray()[] {
        if (buffer == null) {
            return new byte[0];
        }
        final DynamicByteBuffer duplicate = buffer.duplicate();
        duplicate.flip();
        final byte[] newBuffer = new byte[duplicate.limit()];
        duplicate.get(newBuffer);
        return newBuffer;
    }
View Full Code Here

                        + "to write Portable header.");
            }

            byte[] header = data.getHeader();
            PortableDataOutput output = (PortableDataOutput) out;
            DynamicByteBuffer headerBuffer = output.getHeaderBuffer();
            out.writeInt(header.length);
            out.writeInt(headerBuffer.position());
            headerBuffer.put(header);
        }
    }
View Full Code Here

    }

    @Override
    public DynamicByteBuffer getHeaderBuffer() {
        if (header == null) {
            header = new DynamicByteBuffer(new byte[64]).order(getByteOrder());
        }
        return header;
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.nio.DynamicByteBuffer

Copyright © 2018 www.massapicom. 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.