Package com.jitlogic.zorka.common.util

Examples of com.jitlogic.zorka.common.util.TapOutputStream.asString()


        ByteArrayOutputStream os = new ByteArrayOutputStream();
        TapOutputStream tos = new TapOutputStream(os);

        tos.write(65); tos.write(66);

        assertEquals("AB", tos.asString());
        assertEquals("AB", new String(os.toByteArray()));
    }


    @Test
View Full Code Here


        ByteArrayOutputStream os = new ByteArrayOutputStream();
        TapOutputStream tos = new TapOutputStream(os);

        tos.write("ABC".getBytes());

        assertEquals("ABC", tos.asString());
        assertEquals("ABC", new String(os.toByteArray()));
    }


    @Test
View Full Code Here

        ByteArrayOutputStream os = new ByteArrayOutputStream();
        TapOutputStream tos = new TapOutputStream(os);

        tos.write("ABCD".getBytes(), 1, 2);

        assertEquals("BC", tos.asString());
        assertEquals("BC", new String(os.toByteArray()));
    }
}
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.