Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 404
Registered: ‎05-31-2011
My Device: curve
My Carrier: devel


Hi, i try to run the StreamingPlayer.zip  application from this link "http://supportforums.blackberry.com/t5/Java-Development/Streaming-media-Start-to-finish/ta-p/488255" but i have 3 errors "cannot find symbol" while running :

1-   private CircularByteBuffer buffer; 

2-  buffer = new CircularByteBuffer(bufferCapacity, true);

3-  buffer.resize(buffer.getSize() + (buffer.getSize() * percent / 100));


can anybody help me plz, if anybody have this application worked i m verry grateful.


thanks in advance;

BlackBerry Development Advisor
Posts: 15,406
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: StreamingPlayer.zip

You'll need to download that separately.  From the article:


Note: The API needs an implementation of a thread safe Circular Byte Buffer. You can copy the implementation as CircularByteBuffer.java to rimx.media.streaming package and then compile the project. For an example, click here.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Contributor
Posts: 8
Registered: ‎11-17-2011
My Device: developer
My Carrier: developer

Re: StreamingPlayer.zip

Hi ahmadahmad,

could you pls tel me how u solved the problem with
buffer.resize(buffer.getSize() + (buffer.getSize() * percent / 100));

i am facing the same
Posts: 1
Registered: ‎07-26-2012
My Device: Bold
My Carrier: Airtel

Re: StreamingPlayer.zip

Add the following method to CircularByteBuffer.java


* Increase the size of the buffer
public void resize(int bySize){
byte[] newBuffer = new byte[bySize];
int marked = marked();
int available = available();
if (markPosition <= writePosition){
// any space between the mark and
// the first write needs to be saved.
// In this case it is all in one piece.
int length = writePosition - markPosition;
System.arraycopy(buffer, markPosition, newBuffer, 0, length);
} else {
int length1 = buffer.length - markPosition;
System.arraycopy(buffer, markPosition, newBuffer, 0, length1);
int length2 = writePosition;
System.arraycopy(buffer, 0, newBuffer, length1, length2);
buffer = newBuffer;
markPosition = 0;
readPosition = marked;
writePosition = marked + available;
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified