Examples of BitChannel


Examples of org.codehaus.preon.channel.BitChannel

    @Test
    public void shouldEncodeCorrectly() throws IOException, NullPointerException {
    Charset charset = Charset.availableCharsets().get(BoundString.Encoding.ASCII);
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        BitChannel channel = new OutputStreamBitChannel(out);
        when(sizeExpr.eval(Matchers.any(Resolver.class))).thenReturn(4);
        FixedLengthStringCodec codec =
                new FixedLengthStringCodec(charset, sizeExpr, null, new BoundString.NullConverter());
        codec.encode("Whatever", channel, resolver);
        out.flush();
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.