Package org.apache.mina.common

Examples of org.apache.mina.common.IoBuffer.remaining()


            return false;
        }
       
        IoBuffer buf = (IoBuffer) message;
        int offset = buf.position();
        return buf.remaining() == 23 &&
               buf.get(offset + 0) == 0x15 && buf.get(offset + 1) == 0x03 &&
               buf.get(offset + 2) == 0x01 && buf.get(offset + 3) == 0x00 &&
               buf.get(offset + 4) == 0x12;
    }
View Full Code Here


            IoBuffer b = undecodedBuffers.peek();
            if (b == null) {
                break;
            }

            int oldRemaining = b.remaining();
            state.decode(b, out);
            int newRemaining = b.remaining();
            if (newRemaining != 0) {
                if (oldRemaining == newRemaining) {
                    throw new IllegalStateException(
View Full Code Here

                break;
            }

            int oldRemaining = b.remaining();
            state.decode(b, out);
            int newRemaining = b.remaining();
            if (newRemaining != 0) {
                if (oldRemaining == newRemaining) {
                    throw new IllegalStateException(
                            DecodingState.class.getSimpleName() + " must " +
                            "consume at least one byte per decode().");
View Full Code Here

            IoBuffer b = undecodedBuffers.peek();
            if (b == null) {
                break;
            }

            int oldRemaining = b.remaining();
            state.decode(b, out);
            int newRemaining = b.remaining();
            if (newRemaining != 0) {
                if (oldRemaining == newRemaining) {
                    throw new IllegalStateException(
View Full Code Here

                break;
            }

            int oldRemaining = b.remaining();
            state.decode(b, out);
            int newRemaining = b.remaining();
            if (newRemaining != 0) {
                if (oldRemaining == newRemaining) {
                    throw new IllegalStateException(
                            DecodingState.class.getSimpleName() + " must " +
                            "consume at least one byte per decode().");
View Full Code Here

            return false;
        }
       
        IoBuffer buf = (IoBuffer) message;
        int offset = buf.position();
        return buf.remaining() == 23 &&
               buf.get(offset + 0) == 0x15 && buf.get(offset + 1) == 0x03 &&
               buf.get(offset + 2) == 0x01 && buf.get(offset + 3) == 0x00 &&
               buf.get(offset + 4) == 0x12;
    }
View Full Code Here

            IoBuffer b = undecodedBuffers.peek();
            if(b == null) {
                break;
            }

            int oldRemaining = b.remaining();
            state.decode(b, out);
            int newRemaining = b.remaining();
            if(newRemaining != 0) {
                if(oldRemaining == newRemaining) {
                    throw new IllegalStateException(DecodingState.class.getSimpleName() + " must "
View Full Code Here

                break;
            }

            int oldRemaining = b.remaining();
            state.decode(b, out);
            int newRemaining = b.remaining();
            if(newRemaining != 0) {
                if(oldRemaining == newRemaining) {
                    throw new IllegalStateException(DecodingState.class.getSimpleName() + " must "
                            + "consume at least one byte per decode().");
                }
View Full Code Here

            IoBuffer newBuff = IoBuffer.allocate(buffer.remaining() - count);
            for (int i = 0; i < pos; i++)
                newBuff.put(buffer.get());

            buffer.skip(count); // hole
            while (newBuff.remaining() > 0)
                newBuff.put(buffer.get());
            newBuff.flip();
            // copy the new buffer in the old one
            buffer.rewind();
            buffer.put(newBuff);
View Full Code Here

                            return;
                        }

                        IoBuffer buf = (IoBuffer) message;
                        if (session.getFilterChain().contains("SSL")
                                && buf.remaining() == 1
                                && buf.get() == (byte) '.') {
                            logger.info("TLS Reentrance");
                            ((SslFilter) session.getFilterChain().get("SSL"))
                                    .startSsl(session);
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.