Package org.apache.mina.core.buffer

Examples of org.apache.mina.core.buffer.IoBuffer.rewind()


    }

    static boolean checkResponse(IoBuffer message) {
        IoBuffer buff = message;
        boolean check = buff.get() == 2;
        buff.rewind();
        return check;
    }

    // Inner classes -------------------------------------------------
    private final class ServerFactory implements KeepAliveMessageFactory {
View Full Code Here


        @Override
        public void messageSent(IoSession session, Object message)
                throws Exception {
            IoBuffer buffer = (IoBuffer) message;
            buffer.rewind();
            byte[] data = new byte[buffer.remaining()];
            buffer.get(data);
            StringBuffer sb = (StringBuffer) session.getAttribute("sent");
            sb.append(new String(data, "ASCII"));
        }
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.