Package org.apache.mina.common

Examples of org.apache.mina.common.ByteBuffer.acquire()


    }

    public void write( byte[] b )
    {
        ByteBuffer buf = ByteBuffer.wrap( b );
        buf.acquire(); // prevent from being pooled.
        session.write( buf );
    }

    public void write( int b )
    {
View Full Code Here


        {
            return null;
        }

        ByteBuffer buffer = ByteBuffer.wrap( bytes, 0, packetLength );
        buffer.acquire(); // prevent from being pooled.

        return buffer;
    }

    /**
 
View Full Code Here

  }

  /** {@inheritDoc} */
  public ByteBuffer encodeAudioData(AudioData audioData) {
    final ByteBuffer result = audioData.getData();
    result.acquire();
    return result;
  }

  /** {@inheritDoc} */
  public ByteBuffer encodeVideoData(VideoData videoData) {
View Full Code Here

  }

  /** {@inheritDoc} */
  public ByteBuffer encodeVideoData(VideoData videoData) {
    final ByteBuffer result = videoData.getData();
    result.acquire();
    return result;
  }

  /** {@inheritDoc} */
    public ByteBuffer encodeUnknown(Unknown unknown) {
View Full Code Here

  }

  /** {@inheritDoc} */
    public ByteBuffer encodeUnknown(Unknown unknown) {
    final ByteBuffer result = unknown.getData();
    result.acquire();
    return result;
  }

  public ByteBuffer encodeStreamMetadata(Notify metaData) {
    final ByteBuffer result = metaData.getData();
View Full Code Here

    return result;
  }

  public ByteBuffer encodeStreamMetadata(Notify metaData) {
    final ByteBuffer result = metaData.getData();
    result.acquire();
    return result;
  }

  /**
     * Setter for serializer.
View Full Code Here

    return out;
  }

  public ByteBuffer encodeFlexStreamSend(FlexStreamSend msg) {
    final ByteBuffer result = msg.getData();
    result.acquire();
    return result;
  }


}
View Full Code Here

    }

    public void write( byte[] b, int off, int len )
    {
        ByteBuffer buf = ByteBuffer.wrap( b, off, len );
        buf.acquire(); // prevent from being pooled.
        session.write( buf );
    }

    public void write( byte[] b )
    {
View Full Code Here

    }

    public void write( byte[] b )
    {
        ByteBuffer buf = ByteBuffer.wrap( b );
        buf.acquire(); // prevent from being pooled.
        session.write( buf );
    }

    public void write( int b )
    {
View Full Code Here

        }

        public void write( byte[] b, int off, int len )
        {
            ByteBuffer buf = ByteBuffer.wrap( b, off, len );
            buf.acquire(); // prevent from being pooled.
            session.write( buf, null );
        }

        public void write( byte[] b )
        {
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.