Package com.couchbase.client.java.document

Examples of com.couchbase.client.java.document.BinaryDocument.content()


    @Test
    public void shouldDecodeCommonBinary() {
        BinaryDocument document = converter.decode("id",
                Unpooled.copiedBuffer("value", CharsetUtil.UTF_8), 0, 0,
                TranscoderUtils.BINARY_COMMON_FLAGS, ResponseStatus.SUCCESS);
        assertEquals("value", document.content().toString(CharsetUtil.UTF_8));
    }

    @Test
    public void shouldDecodeLegacyBinary() {
        BinaryDocument document = converter.decode("id",
View Full Code Here


    @Test
    public void shouldDecodeLegacyBinary() {
        BinaryDocument document = converter.decode("id",
                Unpooled.copiedBuffer("value", CharsetUtil.UTF_8), 0, 0,
                TranscoderUtils.BINARY_COMPAT_FLAGS, ResponseStatus.SUCCESS);
        assertEquals("value", document.content().toString(CharsetUtil.UTF_8));
    }

    @Test
    public void shouldNotReleaseBufferWhenDecoded() {
        ByteBuf content = ReferenceCountUtil.releaseLater(Unpooled.copiedBuffer("value", CharsetUtil.UTF_8));
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.