Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create a player to directly read from a Buffer (ByteBuffer)

Status
Not open for further replies.

2147087

Programmer
Nov 20, 2002
3
CA
I like to create a player and read from a byte array. Bellow is the link from another tektip member with the suggestion of how to achieve that. s/he is using ByteBuffer, I'm trying to use put method to fill out my ByteBuffer with the byte array but it keep giving me java.lang.NullPointerException
here is what i do
ByteBuffer inputbuf;
inputbuf.put(videodata, 0, videodata.length);

it suppose to be straight forward but it doesn't work. I also tried
inputbuf.wrap(videodata, 0, videodata.length);
which doesn't give me error but it retunes null... does anybody has any suggestions.
Thanx
Here is the link to the suggestions:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top