Package org.apache.mina.core.buffer

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


       
        ITag tag = new Tag();
              tag.setDataType(streampacket.getDataType());
             
              //log.debug("data.limit() :: "+data.limit());
        tag.setBodySize(data.limit());
        tag.setTimestamp(timeStamp);
        tag.setBody(data);
       
        writer.writeTag(tag);
       
View Full Code Here


          return;
        }
       
        IoBuffer data = streampacket.getData().asReadOnlyBuffer();
       
        if (data.limit() == 0) {
          return;
        }
       
        this.byteCount += data.limit();
       
View Full Code Here

       
        if (data.limit() == 0) {
          return;
        }
       
        this.byteCount += data.limit();
       
        if (startTimeStamp == -1) {
         
          //That will be not bigger then long value
          startTimeStamp = streampacket.getTimestamp();
View Full Code Here

       
              ITag tag = new Tag();
              tag.setDataType(streampacket.getDataType());
             
              //log.debug("data.limit() :: "+data.limit());
        tag.setBodySize(data.limit());
        tag.setTimestamp(timeStamp);
        tag.setBody(data);
       
       
        if (this.isInterview) {
View Full Code Here

                in.position(pos);

                if (ctx.getOverflowPosition() == 0) {
                    IoBuffer buf = ctx.getBuffer();
                    buf.flip();
                    buf.limit(buf.limit() - matchCount);
                   
                    try {
                        writeText(session, buf.getString(ctx.getDecoder()), out);
                    } finally {
                        buf.clear();
View Full Code Here

                in.position(pos);

                if (ctx.getOverflowPosition() == 0) {
                    IoBuffer buf = ctx.getBuffer();
                    buf.flip();
                    buf.limit(buf.limit() - matchCount);
                   
                    try {
                        writeText(session, buf.getString(ctx.getDecoder()), out);
                    } finally {
                        buf.clear();
View Full Code Here

                    in.position(pos);
                   
                    if (ctx.getOverflowPosition() == 0) {
                        IoBuffer buf = ctx.getBuffer();
                        buf.flip();
                        buf.limit(buf.limit() - matchCount);
                       
                        try {
                            writeText(session, buf.getString(ctx.getDecoder()), out);
                        } finally {
                            buf.clear();
View Full Code Here

                    in.position(pos);
                   
                    if (ctx.getOverflowPosition() == 0) {
                        IoBuffer buf = ctx.getBuffer();
                        buf.flip();
                        buf.limit(buf.limit() - matchCount);
                       
                        try {
                            writeText(session, buf.getString(ctx.getDecoder()), out);
                        } finally {
                            buf.clear();
View Full Code Here

        }

        buf.setAutoExpand(true);
        buf.put((byte) 0);
        assertEquals(2, buf.position());
        assertEquals(2, buf.limit());
        assertEquals(2, buf.capacity());

        buf.setAutoExpand(false);
        try {
            buf.put(3, (byte) 0);
View Full Code Here

                logger.debug("New buffered message written !");
                counter++;
                try {
                    IoBuffer buf = (IoBuffer) writeRequest.getMessage();
                    if (counter == 3) {
                        assertEquals(1, buf.limit());
                        assertEquals(0, buf.get());
                    } else {
                        assertEquals(10, buf.limit());
                    }
                } catch (Exception ex) {
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.