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());