Package org.jgroups.util

Examples of org.jgroups.util.ByteArrayDataOutputStream.writeBytes()



    public void testWriteBytes() {
        String name="Bela";
        ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(2);
        out.writeBytes(name);
        assert out.position() == name.length();
        ByteArrayDataInputStream in=new ByteArrayDataInputStream(out.buffer());
        byte[] tmp=new byte[name.length()];
        int read=in.read(tmp, 0, tmp.length);
        assert read == name.length();
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.