Package org.apache.mina.core.buffer

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


  //
  //        buffer.putInt(request.getNumberOfCharacters());
  //
  //        buffer.flip();
     
      buffer.flip();
     
          out.write(buffer);
       
      } else if (message instanceof ServerStatusBean) {
       
View Full Code Here


      buffer.put(this.convertIntToByteArray(0));//4 Byte => this data is not needed
      buffer.put(securityTokenAsByte);//32 Byte usually
      buffer.put(this.convertIntToByteArray(clientStatusBean.getTileWidth()));//4 Byte
      buffer.put(this.convertIntToByteArray(clientStatusBean.getTileHeight()));//4 Byte
     
      buffer.flip();
     
          out.write(buffer);
       
      } else if (message instanceof ServerFrameCursorStatus) {
       
View Full Code Here

      buffer.put(this.convertIntToByteArray(0));//4 Byte
      buffer.put(this.convertIntToByteArray(0));//4 Byte
      buffer.put(this.convertIntToByteArray(0));//4 Byte => this data is not needed
      buffer.put(securityTokenAsByte);//32 Byte usually
     
      buffer.flip();
     
          //out.write(buffer);
       
      }
View Full Code Here

      ClientCaptureScreen.frameCalculated += frameSize;
      if (ClientStartScreen.instance!=null) {
        ClientStartScreen.instance.updateScreen();
      }
     
      buffer.flip();
     
          out.write(buffer);
       
      } else if (message instanceof ClientStatusBean) {
       
View Full Code Here

      ClientCaptureScreen.frameCalculated += frameSize;
      if (ClientStartScreen.instance!=null) {
        ClientStartScreen.instance.updateScreen();
      }
     
      buffer.flip();
     
          out.write(buffer);
       
      } else if (message instanceof ClientViewerRegisterBean) {
       
View Full Code Here

      ClientCaptureScreen.frameCalculated += frameSize;
      if (ClientStartScreen.instance!=null) {
        ClientStartScreen.instance.updateScreen();
      }
     
      buffer.flip();
     
          out.write(buffer);
     
      } else if (message instanceof ClientCursorStatus) {
       
View Full Code Here

      ClientCaptureScreen.frameCalculated += frameSize;
      if (ClientStartScreen.instance!=null) {
        ClientStartScreen.instance.updateScreen();
      }
     
      buffer.flip();
     
          out.write(buffer);
     
      }
View Full Code Here

    IoBuffer bodyBuf = tag.getBody();
    bytesWritten += channel.write(bodyBuf.buf());

    if (audioCodecId == -1 && tag.getDataType() == ITag.TYPE_AUDIO) {
      bodyBuf.flip();
      byte id = bodyBuf.get();
      audioCodecId = (id & ITag.MASK_SOUND_FORMAT) >> 4;
    } else if (videoCodecId == -1 && tag.getDataType() == ITag.TYPE_VIDEO) {
      bodyBuf.flip();
      byte id = bodyBuf.get();
View Full Code Here

    if (audioCodecId == -1 && tag.getDataType() == ITag.TYPE_AUDIO) {
      bodyBuf.flip();
      byte id = bodyBuf.get();
      audioCodecId = (id & ITag.MASK_SOUND_FORMAT) >> 4;
    } else if (videoCodecId == -1 && tag.getDataType() == ITag.TYPE_VIDEO) {
      bodyBuf.flip();
      byte id = bodyBuf.get();
      videoCodecId = id & ITag.MASK_VIDEO_CODEC;
    }
    duration = Math.max(duration, tag.getTimestamp() + offset);
    log.debug("Writer duration: {} offset: {}"+ tag.getTimestamp()+ duration+ offset)
View Full Code Here

    if (audioCodecId != null) {
      params.put("audiocodecid", audioCodecId.intValue());
    }
    params.put("canSeekToEnd", true);
    out.writeMap(params, new Serializer());
    buf.flip();

    if (fileMetaSize == 0) {
      fileMetaSize = buf.limit();
    }
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.