Package org.apache.mina.codec.textline.TextLineDecoder

Examples of org.apache.mina.codec.textline.TextLineDecoder.Context


    }

    @Test
    public void testThatWindowsLineTerminatedLongStringReturnsNonEmptyResult() {
        TextLineDecoder decoder = new TextLineDecoder(LineDelimiter.WINDOWS);
        Context context = decoder.createDecoderState();
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < 100; ++i) {
            sb.append("a string");
        }
        String results = decoder.decode(ByteBuffer.wrap((sb.toString() + "\r\n").getBytes()), context);
        assertNotNull(results);
        assertEquals(sb.toString(), results);
        assertEquals(0, context.getBuffer().position());
    }
View Full Code Here

TOP

Related Classes of org.apache.mina.codec.textline.TextLineDecoder.Context

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.