Package org.apache.derby.iapi.types

Examples of org.apache.derby.iapi.types.PositionedStream


        assertEquals(curCharPos, csd.getCurCharPos());
        assertEquals(byteLength, csd.getByteLength());
        assertEquals(charLength, csd.getCharLength());
        assertEquals(maxCharLen, csd.getMaxCharLength());

        PositionedStream emptyPS = new PositionedTestStream(curBytePos);
        // Set only a few values.
        csd = new CharacterStreamDescriptor.Builder().bufferable(true).
                positionAware(true). maxCharLength(maxCharLen).
                stream(emptyPS.asInputStream()).build();
        assertEquals(true, csd.isBufferable());
        assertEquals(true, csd.isPositionAware());
        assertEquals(maxCharLen, csd.getMaxCharLength());

        // Set data offset and update the character position accordingly.
        csd = new CharacterStreamDescriptor.Builder().bufferable(true).
                positionAware(true).dataOffset(dataOffset).
                curCharPos(CharacterStreamDescriptor.BEFORE_FIRST).
                stream(emptyPS.asInputStream()).build();
        assertEquals(true, csd.isBufferable());
        assertEquals(true, csd.isPositionAware());
        assertEquals(dataOffset, csd.getDataOffset());
        assertEquals(CharacterStreamDescriptor.BEFORE_FIRST,
                csd.getCurCharPos());
View Full Code Here


        assertEquals(curCharPos, csd.getCurCharPos());
        assertEquals(byteLength, csd.getByteLength());
        assertEquals(charLength, csd.getCharLength());
        assertEquals(maxCharLen, csd.getMaxCharLength());

        PositionedStream emptyPS = new PositionedTestStream(curBytePos);
        // Set only a few values.
        csd = new CharacterStreamDescriptor.Builder().bufferable(true).
                positionAware(true). maxCharLength(maxCharLen).
                stream(emptyPS.asInputStream()).build();
        assertEquals(true, csd.isBufferable());
        assertEquals(true, csd.isPositionAware());
        assertEquals(maxCharLen, csd.getMaxCharLength());

        // Set data offset and update the character position accordingly.
        csd = new CharacterStreamDescriptor.Builder().bufferable(true).
                positionAware(true).dataOffset(dataOffset).
                curCharPos(CharacterStreamDescriptor.BEFORE_FIRST).
                stream(emptyPS.asInputStream()).build();
        assertEquals(true, csd.isBufferable());
        assertEquals(true, csd.isPositionAware());
        assertEquals(dataOffset, csd.getDataOffset());
        assertEquals(CharacterStreamDescriptor.BEFORE_FIRST,
                csd.getCurCharPos());
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.types.PositionedStream

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.